Finds the projection index for a matrix of points x
, when
projected onto a curve s
. The curve need not be of the same
length as the number of points. If the points on the curve are not in
order, this order needs to be given as well, in tag
.
1  get.lam(x, s, tag, stretch = 2)

x 
a matrix of data points 
s 
a parametrized curve, represented by a polygon. 
tag 
the order of the point in 
stretch 
A stretch factor for the endpoints of the curve; a maximum of 2. it allows the curve to grow, if required, and helps avoid bunching at the end. 
A structure is returned which represents a fitted curve. It has components
s 
The fitted points on the curve corresponding to each point

tag 
the order of the fitted points 
lambda 
The projection index for each point 
dist 
The total squared distance from the curve 
principal.curve
Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
All documentation is copyright its authors; we didn't write any of that.