% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/misc.R
\name{farthestPoint}
\alias{farthestPoint}
\title{farthestPoint}
\usage{
farthestPoint(y, x = NULL)
}
\arguments{
\item{y}{Monotonically inscreasing or decreasing values}

\item{x}{Optional x coordinates corresponding to `y` (defaults to seq)}
}
\value{
The value of `x` farthest from the diagonal.
}
\description{
Identifies the point farthest from a line passing through by the first and 
last points. Used for automatization of the elbow method.
}
\examples{
y <- 2^(10:1)
plot(y)
x <- farthestPoint(y)
points(x,y[x],pch=16)
}
