Skip to content

collapse

2.1.8Package record

Advanced and Fast Data Transformation

48packages dependsuggested by 18
560.7Kdownloads / year
75.1%test coverage
13/13flavors OK

Overview

About

A large 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, fast functions for data transformation and 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 seamlessly supports base R objects/classes as well as 'units', 'integer64', 'xts'/ 'zoo', 'tibble', 'grouped_df', 'data.table', 'sf', and 'pseries'/'pdata.frame'. For a concise overview of the package see Krantz (2026) doi:10.18637/jss.v116.i01.

Changes in 2.1.8
  • Fixed a bug in setv()/copyv() where assignments into character (STRSXP) or list (VECSXP) vectors bypassed R's generational write barrier, writing element pointers directly instead of using SET_STRING_ELT()/SET_VECTOR_ELT(). This could cause an old-generation target to hold an unrecorded reference to a younger value, which a subsequent young-generation garbage collection could free while still referenced, leading to memory corruption, cryptic CHAR()/SET_STRING_ELT() errors, or segfaults, most likely under heavy allocation in long-running processes. Thanks @SebKrantz for reporting and diagnosing (#876).
  • Fixed a bug in fmatch() (and thus %in%/%!in%/%iin%/%!iin% and joins) where a logical NA in x could spuriously match a non-NA value in table (e.g. 2L) when table was not itself logical. Thanks @LJ-Jenkins for reporting (#870).
  • Fixed a bug in fslice() (grouped, n = 1, with.ties = FALSE) that caused R to crash with a fatal error when a group had only missing values in order.by. Thanks @chihyunkim for reporting (#867).

From NEWS.md in the release

Install

Health

CRAN checks
13OK
Slowest check: 13.6 min · r-oldrel-windows-x86_64
Status changes
  • OK13 OK2026-08-05
  • NOTE12 OK, 1 NOTE2026-08-01
  • OK12 OK2026-04-25
  • NOTE11 OK, 3 NOTE2026-04-22
  • ERROR10 OK, 3 NOTE, 1 ERROR2026-04-18
Show 1 earlier changeHide 1 earlier change
  • NOTE11 OK, 3 NOTE2026-03-10
Advisories

none known

Documentation

In release 2.1.8
README· In the repository, left out of the releaseVignettesYes · 5 · dynamicNEWSYes · 100% structured · mentions 2.1.8Citation fileYes · cites a publicationWebsiteYes · pkgdown
Cites a JSS article
Help pages
82includes a package overview page
Examples that run
100%73 run in a plain check
Exported functions with examples
94%
Documented parameters
85%
Return-value docs
90%
Help pages citing references
28%

Downloads

560.7K
CRAN downloads in the past year
Rank #536 · ~1.5K/day · ~46.7K/mo
Daily download trend is not available in this view yet.
44.1K30 days
129.8K90 days
560.7K1 year
Compare downloads with other packages →
Also on8.3K r2u11 autocran19K conda_forge178 c2d4u

Repository

708Stars
37Forks
19Open issues
3Open PRs
61Releases
3,540Commits
14Commit identities
rcranrstatsstatisticsdata-sciencescientific-computingtime-seriespanel-data
3,540 commits · Last activity 2026-08-30 · +0.3% stars, 30d · Discussions: 3 posts
Responsiveness
How these are sampled
PRs merged (all time)
94%
Median days to close, 50 most recently updated closed issues
4
Median days to close, 50 most recently updated closed PRs
0

Stars over time

2025-10-21 · 6882026-09-30 · 708
PracticesBeta

12 development-tooling and community-health practices detected across 7 families in the upstream repository

Checks run against github.com/fastverse/collapse on 2026-10-18.

Continuous integration (2)
GitHub ActionsR CMD check workflow

The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel

Governance and community (3)
Contributing guideIssue templatesPR template
Docs source (3)
pkgdown

GitHub Pages site last deployed 2026-09-17 · The repository has a site deploy workflow

pkgdown site last built 2026-09-17

Coverage (1)
Coverage reporting (Codecov)
Show all practicesHide 3 practices
Research and citation (1)
CITATION.cff
Lint, format, editor (1)
RStudio project
Git structural (1)
.gitattributes
How this is detected·Detection ruleset v3 (2026-09-26)
AI coding toolsBeta

This repository shows signs of AI coding tools.

  • Claude Codefirst seen 2026-03-27
    Seen in the repository: CLAUDE.md
    Named in .Rbuildignore: .claude, CLAUDE.md
    Pull request it wrote: opened by a project member
    Commits: 5 by its own account · at least 3 crediting it in the message
  • Cursorfirst seen 2026-05-17
    Pull request it wrote: opened by a project member
    Commits: at least 4 crediting it in the message
From outside contributors
  • Claude Code
    Pull requests: 1 from outside contributors, first on 2026-09-23, 1 from forks
Models named in its commits
  • Claude Sonnet 4.52 commits · May 2026
Counts are commits, not lines of code. Commits by a tool's accounts count once across all of its accounts. Commits crediting it are the largest count among its credit lines, a minimum.How this is detected·Detection ruleset v4 (updated 2026-09-27)

Dependencies

Declared dependencies
24 external dependencies (excludes base and recommended)

Installing collapse adds 1 package (1 with compiled code, 1.8 MB of source tarballs). Heaviest: Rcpp 1.8 MB.

Depends (1)
R >= 4.1.0
Imports (1)
LinkingTo (1)
Enhances (0)
none

Datasets

People & History

People (12)
Author, Maintainer since 1.0.0 (2020)
Contributor · added in 1.5.0
Contributor · added in 2.1.0
Contributor
Contributor · added in 1.7.0
Contributor · added in 2.1.6
Contributor
Show 1 more contributorHide 1 contributor
Contributor · added in 1.4.2
Copyright holder
Listed in earlier versions (2)
no longer listed · 1.0.0 to 1.4.2
no longer listed · 1.5.0 to 1.7.2
Releases (58)

Pick two releases to compare their code metrics.

Show 52 earlier eventsHide 52 earlier events
  • 2.0.14
    record
    2024-05-25 · diff ↗ ·
    added 2 exports
    group_by_vars, as_integer_factor
  • R
    R 4.4.0 released · 2024-04-24
  • 2.0.13
    record
    2024-04-14 · diff ↗
  • 2.0.12
    record
    2024-04-01 · diff ↗
  • 2.0.11
    record
    2024-03-21 · diff ↗
  • 2.0.10
    record
    2024-02-17 · diff ↗
  • 2.0.9
    record
    2024-01-11 · diff ↗ ·
    added 2 exports
    na_locf, na_focb
  • 2.0.7
    record
    2023-12-07 · diff ↗ ·
    added 2 exports
    replace_na, replace_inf
  • 2.0.6
    record
    2023-11-12 · diff ↗
  • 2.0.3
    record
    2023-10-18 · diff ↗
  • 2.0.2
    record
    2023-10-14 · diff ↗ ·
    added 8 exports
    pivot, vec, join, fmatch, `%iin%`, `%!iin%`, rowbind, .COLLAPSE_OLD
  • 1.9.6
    record
    2023-05-28 · diff ↗
  • R
    R 4.3.0 released · 2023-04-21
  • 1.9.5
    record
    2023-04-07 · diff ↗
  • 1.9.4
    record
    2023-03-31 · diff ↗
  • 1.9.3
    record
    2023-02-27 · diff ↗ ·
    added 2 exports
    fduplicated, any_duplicated
  • 1.9.2
    record
    2023-01-25 · diff ↗ ·
    added 4 exports
    plot.psmat, .range, set_collapse, get_collapse
  • 1.9.0
    record
    2023-01-15 · diff ↗ ·
    removed 13 exports
    F, fNdistinct.data.frame, fNdistinct.default, fNdistinct.matrix, fNobs.data.frame, fNobs.default, fNobs.matrix, fHDbetween.default, fHDbetween.matrix, fHDbetween.data.frame, fHDwithin.default, fHDwithin.matrix, fHDwithin.data.frame
    added 8 exports
    fsummarize, GRPid, fcount, fcountv, descr.default, fquantile, .quantile, fdist
  • 1.8.9
    record
    2022-10-07 · diff ↗ ·
    added 2 exports
    rsplit.matrix, setattrib
  • 1.8.8
    record
    2022-08-15 · diff ↗ ·
    added 4 exports
    all_funs, fFtest.default, flm.default, itn
  • 1.8.6
    record
    2022-06-14 · diff ↗
  • 1.8.5
    record
    2022-06-13 · diff ↗
  • 1.8.4
    record
    2022-06-08 · diff ↗ ·
    removed 3 exports
    is.regular, Recode, replace_non_finite
    added 16 exports
    timeid, is_irregular, findex_by, iby, findex, ix, reindex, unindex, to_plm, qtab, qtable, greorder, setTRA, vgcd, frange, fnunique
  • R
    R 4.2.0 released · 2022-04-22
  • 1.7.6
    record
    2022-02-11 · diff ↗ ·
    added 1 export
    GRPN
  • 1.7.5
    record
    2022-02-03 · diff ↗
  • 1.7.3
    record
    2022-01-26 · diff ↗
  • 1.7.2
    record
    2022-01-23 · diff ↗
  • 1.7.0
    record
    2022-01-14 · diff ↗ ·
    added 23 exports
    fmutate, mtt, gsplit, vlengths, whichv, `%==%`, `%!=%`, whichNA, copyv, setv, setop, `%+=%`, `%-=%`, `%*=%`, `%/=%`, allv, anyv, massign, `%=%`, rnm, relabel, setrelabel, group
  • 1.6.5
    record
    2021-07-24 · diff ↗
  • 1.6.4
    record
    2021-07-13 · diff ↗
  • 1.6.2
    record
    2021-07-04 · diff ↗ ·
    added 2 exports
    fcomputev, setLabels
  • 1.6.0
    record
    2021-06-28 · diff ↗ ·
    added 34 exports
    as_factor_GRP, as_factor_qG, date_vars, `date_vars<-`, fcumsum, fcumsum.data.frame, fcumsum.default, fcumsum.matrix, fndistinct, fndistinct.data.frame, fndistinct.default, fndistinct.matrix, fnobs, fnobs.data.frame, fnobs.default, fnobs.matrix, fhdbetween, fhdbetween.default, fhdbetween.matrix, fhdbetween.data.frame, fhdwithin, fhdwithin.default, fhdwithin.matrix, fhdwithin.data.frame, is_categorical, is_date, is_GRP, is_qG, is_unlistable, pwnobs and 4 more
  • R
    R 4.1.0 released · 2021-05-18
  • 1.5.3
    record
    2021-03-07 · diff ↗
  • 1.5.2
    record
    2021-03-02 · diff ↗ ·
    added 3 exports
    fsummarise, smr, t_list
  • 1.5.1
    record
    2021-01-12 · diff ↗
  • unarchivedReturned to CRAN
    2021-01-04
  • 1.5.0
    record
    2021-01-04 · diff ↗ ·
    added 12 exports
    allNA, missing_cases, `%rr%`, `%r+%`, `%r-%`, `%r*%`, `%r/%`, `%cr%`, `%c+%`, `%c-%`, `%c*%`, `%c/%`
  • archivedRemoved from CRAN
    2020-12-19
    check problems were not corrected in time
  • 1.4.2
    record
    2020-11-10 · diff ↗
  • 1.4.1
    record
    2020-11-09 · diff ↗
  • 1.4.0
    record
    2020-11-01 · diff ↗ ·
    removed 2 exports
    as.factor.GRP, group_names.GRP
    added 13 exports
    gby, flm, cinv, qTBL, rsplit, rsplit.default, rsplit.data.frame, fdroplevels, fdroplevels.factor, fdroplevels.data.frame, setAttrib, copyAttrib, copyMostAttrib
  • 1.3.2
    record
    2020-09-13 · diff ↗ ·
    added 4 exports
    ftransformv, tfmv, settransformv, settfmv
  • 1.3.1
    record
    2020-08-27 · diff ↗
  • 1.3.0
    record
    2020-08-11 · diff ↗ ·
    added 21 exports
    as.factor_GRP, as.factor_qG, `ftransform<-`, `tfm<-`, fnth, fnth.data.frame, fnth.default, fnth.matrix, gvr, `gvr<-`, fungroup, GRPnames, .c, roworder, roworderv, frename, setrename, colorder, colorderv, funique.default, funique.data.frame
  • 1.2.1
    record
    2020-05-27 · diff ↗
  • 1.2.0
    record
    2020-05-19 · diff ↗ ·
    added 36 exports
    fselect, slt, `fselect<-`, `slt<-`, ss, fsubset, sbt, fsubset.data.frame, fsubset.default, fsubset.matrix, ftransform, tfm, settransform, settfm, fcompute, Dlog, varying, varying.data.frame, varying.default, varying.matrix, radixorder, radixorderv, seqid, groupid, fgroup_by, fgroup_vars, is.qG, unattrib, na_omit, recode_num and 6 more
  • R
    R 4.0.0 released · 2020-04-24
  • 1.1.0
    record
    2020-04-01 · diff ↗ ·
    added 3 exports
    ckmatch, finteraction, as.character_factor
  • 1.0.0
    record
    2020-03-19
  • R
    R 3.6.0 released · 2019-04-26

Package metadata

First published
2020-03-19
Total releases
58 / 6 yrs
License
GPL (>= 2) | file LICENSE OSI
Minimum R
≥ 4.1.0
Bundled data
571 KB / 2 files
Download size
1.4 MB

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("collapse")

The package provides a citation file that builds its entry when R runs it. Run citation() to see it.

The repository also keeps a CITATION.cff.

Cite the R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for collapse version 2.1.8 [Data set]. HJJB, LLC. Data release v2026-10-22. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-22, which the citation names so these numbers can be found later. More on citing and the projects behind them.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy