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, robust and programmer friendly. 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 base R classes, 'dplyr'/'tibble', 'data.table', 'sf', 'units', 'plm' (panel-series and data frames), and 'xts'/'zoo'.

Version: 2.0.15
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, withr
Published: 2024-07-08
DOI: 10.32614/CRAN.package.collapse
Author: Sebastian Krantz ORCID iD [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
Citation: collapse citation info
Materials: NEWS
In views: Econometrics, OfficialStatistics, TimeSeries
CRAN checks: collapse results


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


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

Reverse dependencies:

Reverse depends: multistateQTL
Reverse imports: africamonitor, aorsf, blocs, cheapr, deduped, DepecheR, dfms, DisImpact, fastverse, FuncDiv, joyn, osmclass, penppml, plm, QTLExperiment, samadb, summclust, timeplyr, ugatsdb, versus, zoomerjoin
Reverse suggests: arcgisutils, bsitar, ctsem, labelr, marginaleffects, mvgam, ordbetareg, tinycodet


Please use the canonical form to link to this page.