Dcurvature provides a fast C++/Rcpp implementation of
discrete curvature on ordered 2D curves, plus a Shiny app for PCA
component selection using curvature-based elbow detection.
# install.packages("remotes")
remotes::install_local("path/to/Dcurvature")library(Dcurvature)
pts <- cbind(
x = seq(0, 1, length.out = 12),
y = sin(seq(0, pi, length.out = 12))
)
kappa <- curvature(pts)
head(kappa)x <- load_example_data()
str(x)if (interactive()) {
run_curvature_app()
}