Find the knee/elbow of a list of sorted points

knee_finder2(x, plot = FALSE)

Arguments

x

A numeric vector.

plot

Whether to make the plot.

Value

A vector of two numeric values. One for the left knee and the second for the right knee.

Examples

x = rnorm(1000)
knee_finder2(x, plot = TRUE)

#> [1]  92 889