Skip to contents

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

πŸ”Ή Agreement and Reliability

πŸ”Ή Effect Sizes

πŸ”Ή Inequality and Diversity

πŸ”Ή Dates and Time

πŸš€ 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.

πŸ™ Acknowledgements

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.

πŸ“œ License

GPL (β‰₯ 2)