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)

plger/pipeComp documentation built on Nov. 2, 2021, 8:40 p.m.