farthestPoint {pipeComp} | R Documentation |
Identifies the point farthest from a line passing through by the first and last points. Used for automatization of the elbow method.
farthestPoint(y, x = NULL)
y |
Monotonically inscreasing or decreasing values |
x |
Optional x coordinates corresponding to 'y' (defaults to seq) |
The value of 'x' farthest from the diagonal.
y <- 2^(10:1) plot(y) x <- farthestPoint(y) points(x,y[x],pch=16)