projectToCurve: Project a set of points to the closest point on a curve

Description Usage Arguments Value See Also

View source: R/RcppExports.R

Description

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.

Usage

1
projectToCurve(x, s, stretch = 1.25)

Arguments

x

a matrix of data points.

s

a parametrized curve, represented by a polygon.

stretch

A stretch factor for the endpoints of the curve, allowing the curve to grow to avoid bunching at the end. Must be a numeric value between 0 and 2. Defaults to 1.25.

Value

A structure is returned which represents a fitted curve. It has components

scores

The fitted points on the curve corresponding to each point x

ord

the order of the fitted points

lambda

The projection index for each point

dist

The total squared distance from the curve

dist_ind

The squared distances from the curve to each of the respective points

See Also

pcurves


abnormally-distributed/cvreg documentation built on May 3, 2020, 3:45 p.m.