Discrete Curvature with 'shiny' Explorer

Implements discrete curvature estimation for ordered planar point sequences using circumcenter geometry on consecutive triplets, exposed through compiled C plus plus (C++) code via 'Rcpp' for speed and numerical robustness. The package is useful for objective elbow detection in multivariate workflows, especially principal component analysis (PCA), where selecting the number of retained components can be subjective. It provides a 'shiny' interface that supports upload of raw datasets or explained-variance tables, computes Kaiser-Meyer-Olkin (KMO) sampling-adequacy diagnostics, evaluates individual and cumulative variance curves, and reports curvature- based decision rules (m* and m**) with visual summaries for reproducible component-selection decisions. References: Arney et al. (2001); Axler (2024) ; Bjorklund (2019) ; Burden and Faires (2015); Chang et al. (2023) < https://CRAN.R-project.org/package=shiny>; Christensen (2019); Cui (2020) ; Eddelbuettel and Sanderson (2014) ; Engelke et al. (2023) ; Gniazdowski (2021) ; Haynes et al. (2017); Jameel and Al-Salami (2023) ; Jolliffe (2002); Jolliffe and Cadima (2016) ; Kaiser (1974); Lehnert et al. (2019) ; Ma and Dai (2011) ; Milligan (1995); Onumanyi et al. (2022) ; Park (2010); Revelle (2024) < https://CRAN.R-project.org/package=psych>; Rodionova et al. (2021) ; Sen and Cohen (2025) ; Serneels and Verdonck (2008) ; Shi et al. (2021) ; Shaukat et al. (2016) ; Syakur et al. (2018) ; Wickham and Bryan (2023) < https://CRAN.R-project.org/package=readxl>; Wu et al. (2017) ; Youssef et al. (2023) .


Dcurvature

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.

Installation

# install.packages("remotes")
remotes::install_local("path/to/Dcurvature")

Core usage

library(Dcurvature)

pts <- cbind(
  x = seq(0, 1, length.out = 12),
  y = sin(seq(0, pi, length.out = 12))
)

kappa <- curvature(pts)
head(kappa)

Example data

x <- load_example_data()
str(x)

Run the app

if (interactive()) {
  run_curvature_app()
}

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("Dcurvature")

0.0.4 by Jorge Jola, 2 months ago


Browse source code at https://github.com/cran/Dcurvature


Authors: Aquiles Darghan [aut] , Jorge Jola [aut, cre]


Documentation:   PDF Manual  


MIT + file LICENSE license


Imports Rcpp, shiny, readxl

Suggests ggplot2, psych, testthat

Linking to Rcpp


See at CRAN