collapse Documentation and Resources

Sebastian Krantz


collapse is a C/C++ based package for data transformation and statistical computing in R. It’s aims are:

  1. To facilitate complex data transformation, exploration and computing tasks in R.
  2. To help make R code fast, flexible, parsimonious and programmer friendly.

Documentation comes in 5 different forms:

Built-In Structured Documentation

After installing collapse, you can call help("collapse-documentation") which will produce a central help page providing a broad overview of the entire functionality of the package, including direct links to all function documentation pages and links to 13 further topical documentation pages (names in .COLLAPSE_TOPICS) describing how clusters of related functions work together.

Thus collapse comes with a fully structured hierarchical documentation which you can browse within R - and that provides everything necessary to fully understand the package. The Documentation is also available online.

The package page under help("collapse-package") provides some general information about the package and its design philosophy, as well as a compact set of examples covering important functionality.

Reading help("collapse-package") and help("collapse-documentation") is the most comprehensive way to get acquainted with the package. help("collapse-documentation") is always the most up-to-date resource.

useR 2022 Presentation and Slides

I have presented collapse in detail at useR 2022. A 2h video recording that provides a quite comprehensive up-to-date introduction is available here. The corresponding slides are available here.


There is an updated (2022) cheatsheet that compactly summarizes the package.


I wrote a recent (2023) rather technical vignette providing some details on collapse’s handling of R objects:

There are 5 further vignettes which are available online (due to their size and the enhanced browsing experience on the website):

Note that these vignettes currently do not cover major features introduced in versions 1.7 through 1.9. They have been updated if you see a 2023 in the date of the vignette. Updating them is currently not a priority for me, but you are welcome to help update them.


I maintain a blog linked to where I introduced collapse with some compact posts covering central functionality. Among these, the post about programming with collapse is useful for developers. A recent post about collapse and the fastverse also provides a broader contextualization and reflective outlook for the collapse and fastverse projects.