farthestPoint: farthestPoint

Description Usage Arguments Value Examples

View source: R/misc.R

Description

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

Usage

1

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

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

pipeComp documentation built on Nov. 8, 2020, 7:35 p.m.