collapse is a C/C++ based package for data transformation and statistical computing in R. It’s aims are:
Documentation comes in 4 different forms:
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 describing how clusters
of related functions work together. The names of these additional help
pages are contained in a global macro
can so easily be called from the R console as well. Function
documentation is interlinked with the relevant topical pages, and all
documentation pages link back to the central overview page at
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
additionally provides some more general information about the package
and its design philosophy, as well as a very compact set of examples
covering important functionality.
help("collapse-documentation") and working through the
help("collapse-package") is the fastest way to
get acquainted with the package.
help("collapse-documentation") is always the most
up-to-date documentation of the package.
There are also 5 vignettes which are available online (due to their size and the enhanced browsing experience on the website). The vignettes are:
Introduction to collapse : Introduces all main features in a structured way
collapse and dplyr : Demonstrates the integration of collapse with dplyr / tidyverse workflows and associated performance improvements
collapse and plm: Demonstrates the integration of collapse with plm and shows examples of efficient programming with panel data
collapse and data.table: Shows how collapse and data.table may be used together in a harmonious way
collapse and sf: Shows how collapse can be used to efficiently manipulate sf data frames
Note that these vignettes currently (May 2022) do not cover features introduced in versions 1.7 and 1.8. They have been updated if you see a 2022 in the date of the vignette.
I maintain a blog linked to Rbloggers.com where I introduced collapse with some compact posts covering central functionality. Among these, the post about programming with collapse is recommended for ambitious users and developers willing to build on collapse.
Finally, there is a cheatsheet
at Rstudio that compactly summarizes the collapse function space,
help("collapse-documentation"). This one will be