farthestPoint {pipeComp}R Documentation

farthestPoint

Description

Identifies the point farthest from a line passing through by the first and last points. Used for automatization of the elbow method.

Usage

farthestPoint(y, x = NULL)

Arguments

y

Monotonically inscreasing or decreasing values

x

Optional x coordinates corresponding to 'y' (defaults to seq)

Value

The value of 'x' farthest from the diagonal.

Examples

y <- 2^(10:1)
plot(y)
x <- farthestPoint(y)
points(x,y[x],pch=16)

[Package pipeComp version 1.3.0 Index]