Title: Tools for Descriptive Statistics β New Generation
License: GPL (β₯ 2)
π§© Overview
DescToolsX is the descriptive-statistics layer of the DescToolsX ecosystem and the redesigned successor to DescTools. It collects the routines needed to describe, summarise and explore data before any model is fitted: frequency and contingency tables, measures of location, dispersion, shape and concentration, association and agreement coefficients, effect sizes, and metrics for evaluating classifiers.
A single desc() generic dispatches on the type of the input, so a numeric vector, a factor, a pair of variables or a whole data frame are all described through the same entry point.
π Documentation: https://andrisignorell.github.io/DescToolsX/
βοΈ Installation
install.packages("DescToolsX")Or the development version from GitHub:
remotes::install_github("AndriSignorell/DescToolsX")π Core Features
πΉ Describing Data
-
desc()β one generic, dispatching on vector, factor, date, numeric pair, table or data frame -
abstract()β compact structure of a data frame including labels -
freq(),freq2D(),percTable(),expFreq()β frequency and contingency tables -
tOne()β βtable oneβ style summaries
πΉ Association and Correlation
- Nominal:
cramerV(),contCoef(),phi(),tschuprowT(),lambda(),uncertCoef(),gkTau(),yule() - Ordinal:
ordAssocs(),conDisPairs(),kendallW() - Continuous:
pearsonCor(),spearmanCor(),corPart(),corPolychor(),hoeffdingD(),findCorrX() -
Association()β common interface across the measures
πΉ Agreement and Reliability
-
cohenKappa(),kappaM(),randolphKappa(),krippAlpha() -
icc(),ccc(),percAgreement(),pabak(),raterFrame() -
cronbachAlpha(),blandAltmanData() -
Agreement()β common interface across the measures
πΉ Inequality and Diversity
-
gini(),atkinson(),theil(),lc()(Lorenz curve) -
herfindahl(),rosenbluth(),simpson(),divCoef() -
entropy(),mutInf()
πΉ Dates and Time
-
addMonths(),as_ym(),countWorkDays(),generation(),zodiac() - date predicates and conversions,
cutAge()
π Design Principles
- Consistent β lowerCamelCase API and uniform argument conventions across the whole DescToolsX suite
- Fast β performance-critical routines implemented in Rcpp and RcppArmadillo
- Generic β S3 generics with methods for vectors, factors, matrices, tables, and data frames
- Robust β validated inputs, informative errors, extensive testthat coverage
π§ͺ Example
library(DescToolsX)
# one generic for very different inputs
desc(iris$Sepal.Length)
desc(iris$Species)
desc(iris)
# frequency table with cumulative columns
freq(iris$Species)
# association between two factors
cramerV(table(mtcars$cyl, mtcars$gear))
# effect size and confidence interval
cohenD(mpg ~ am, data = mtcars)π§± The Suite
DescToolsX builds on bedrock (base utilities), pharos (graphics) and lumen (tests, confidence intervals, distributions). alloy (modelling), pons (MS-Office) and swissValet (RStudio addins) complete the family.
