# NOT RUN {
# Generate some knee data
x <- runif(100, min=-3, max=3)
y <- -exp(-x) * (1+rnorm(100)/3)
plot(x, y)
# Plot knee points calculated using two different methods
points(findCutoff(x,y), col="red", pch=20, cex=3)
points(findCutoff(x,y, method="curvature"), col="blue", pch=20, cex=3)
# }
Run the code above in your browser using DataLab