Title: Tools for Descriptive Statistics — New Generation
License: GPL (≥ 2)
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/
install.packages("DescToolsX")Or the development version from GitHub:
remotes::install_github("AndriSignorell/DescToolsX")desc()— one generic, dispatching on vector, factor, date, numeric pair, table or data frameabstract()— compact structure of a data frame including labelsfreq(),freq2D(),percTable(),expFreq()— frequency and contingency tablestOne()— "table one" style summaries
meanX(),medianX(),modeX(),quantileX(),rangeX()gmean(),hmean(),huberM(),tukeyBiweight(),hodgesLehmann()varX(),madX(),iqrX(),meanAbsDev(),meanSE(),coefVar()skew(),kurt()
- Nominal:
cramerV(),contCoef(),phiCoef(),tschuprowT(),gkLambda(),uncertCoef(),gkTau(),yule() - Ordinal:
ordAssocs(),conDisPairs(),kendallW() - Continuous:
pearsonCor(),spearmanCor(),partialCor(),polychorCor(),hoeffdingD(),findCor() Association()— common interface across the measures
cohenKappa(),kappaM(),randolphKappa(),krippAlpha()icc(),ccc(),percAgreement(),pabak(),raterFrame()cronbachAlpha(),blandAltmanData()Agreement()— common interface across the measures
cohenD(),cohenH(),glassDelta(),etaSq()
auc(),cStat(),brierScore()mae(),mape(),mse(),rmse(),nmae(),nmse(),smape()isConfusionTable(),normalizeToConfusion()oddsRatio(),relRisk()
gini(),atkinson(),theil(),lc()(Lorenz curve)herfindahl(),rosenbluth(),simpson(),divCoef()entropy(),mutInf()
addMonths(),asYm(),countWorkDays(),generation(),zodiac()- date predicates and conversions,
cutAge()
boxCox(),boxCoxLambda(),yeoJohnson(),logSt(),scaleX()cutQ(),cut.integer()impute(),imputeKnn()outlier(),extremes(),lof()
- 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
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)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.
Parts of the code and documentation were reviewed with the help of large language models (OpenAI Codex, Anthropic Claude). Every suggestion was assessed, edited and verified by the maintainer, who remains solely responsible for the content of this package.
GPL (≥ 2)
