[R] How to calculate the closest distance from a point to a curve?
Jose Lozano (MEGA)
jelozano at wanadoo.es
Tue Feb 25 20:10:03 CET 2003
>Now I have non-parametric curve function, that is,
>I only use N 2-Dimensional data points to represent
>this curve, without explicit function formulation.
(x,y) gives the points that define the curve (I've generated a circle
centered at 0)
(a,b) is the point (I've set it to (2,2))
The code to find the closest point to (a,b) is:
More information about the R-help