I'd like to calculate the distance between a point and a line in any number (i.e., n) of dimensions.
An excellent example for 2- and 3- dimensions is found here.
Is there a way to generalize this solution to a greater number of dimensions? I have seen other solutions posted previously, but I am not sure exactly how to apply this in R.
Many thanks,
Ken