RamerDouglasPeucker(x, y, epsilon, keep_index = FALSE)
Value
A data.frame with x and y values of the simplified curve.
Arguments
x
[numeric] The x values of the curve as a vector without NA values.
y
[numeric] The y values of the curve as a vector without NA values.
epsilon
[positive numeric(1)] The threshold for filtering outliers from the simplified curve.
keep_index
[logical] If TRUE, returns a column called index with the index locations of points that are kept.
Details
If there are no more than two points it does not make sense to simplify.
In this case the input is returned without further checks of x and y.
In particular, the input is not checked for NA values.