collapse: Advanced and Fast Data Transformation

A C/C++ based package for advanced data transformation and statistical computing in R that is extremely fast, class-agnostic, and programmer friendly through a flexible and robust API. Core functionality includes a rich set of S3 generic grouped and weighted statistical functions for vectors, matrices and data frames, which provide efficient low-level vectorizations, OpenMP multithreading, and skip missing values by default. These are integrated with fast grouping and ordering algorithms (also callable from C), and efficient data manipulation functions. The package also provides a flexible and rigorous approach to time series and panel data in R. It further includes fast functions for common statistical procedures, detailed (grouped, weighted) summary statistics, powerful tools to work with nested data, fast data object conversions, functions for memory efficient R programming, and helpers to effectively deal with variable labels, attributes, and missing data. It is well integrated with basic R, 'dplyr'/'tibble', 'data.table', 'sf', 'plm' (panel-series and data frames), and accommodates, by virtue of smart internal attribute handling, many other classes (like 'ts', 'xts'/'zoo' or 'tsibble').

Version: 1.9.6
Depends: R (≥ 3.3.0)
Imports: Rcpp (≥ 1.0.1)
LinkingTo: Rcpp
Suggests: fastverse, data.table, magrittr, kit, xts, zoo, plm, fixest, vars, RcppArmadillo, RcppEigen, tibble, dplyr, ggplot2, scales, microbenchmark, testthat, covr, knitr, rmarkdown
Published: 2023-05-28
Author: Sebastian Krantz [aut, cre], Matt Dowle [ctb], Arun Srinivasan [ctb], Morgan Jacob [ctb], Dirk Eddelbuettel [ctb], Laurent Berge [ctb], Kevin Tappe [ctb], R Core Team and contributors worldwide [ctb], Martyn Plummer [cph], 1999-2016 The R Core Team [cph]
Maintainer: Sebastian Krantz <sebastian.krantz at>
License: GPL-2 | GPL-3 | file LICENSE [expanded from: GPL (≥ 2) | file LICENSE]
NeedsCompilation: yes
Materials: NEWS
In views: Econometrics, OfficialStatistics, TimeSeries
CRAN checks: collapse results


Reference manual: collapse.pdf
Vignettes: collapse Documentation and Resources
collapse's Handling of R Objects


Package source: collapse_1.9.6.tar.gz
Windows binaries: r-devel:, r-release:, r-oldrel:
macOS binaries: r-release (arm64): collapse_1.9.6.tgz, r-oldrel (arm64): collapse_1.9.6.tgz, r-release (x86_64): collapse_1.9.6.tgz, r-oldrel (x86_64): collapse_1.9.6.tgz
Old sources: collapse archive

Reverse dependencies:

Reverse imports: africamonitor, aorsf, blocs, dfms, DisImpact, fastverse, FuncDiv, fwildclusterboot, osmclass, penppml, plm, samadb, summclust, ugatsdb
Reverse suggests: marginaleffects, ordbetareg


Please use the canonical form to link to this page.