r-collapse

Accelerate grouped and weighted statistical operations in R using the collapse package.

19|1|Updated Mar 3, 2026
One-click install
npx skills add https://github.com/arthurgailes/awesome-r-skills --skill r-collapse
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: r-collapse
Source: https://github.com/arthurgailes/awesome-r-skills/tree/main/skills/r-collapse
Command: npx skills add https://github.com/arthurgailes/awesome-r-skills --skill r-collapse

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill addresses performance bottlenecks in R when dealing with large datasets and complex grouped or weighted statistical operations, offering a significantly faster alternative to packages like dplyr for specific tasks.

Core Features & Use Cases

  • High-Performance Aggregation: Utilizes C/C++ backend for grouped and weighted statistics, achieving speeds 50-100x faster than dplyr.
  • Panel Data Operations: Efficiently handles time-series cross-sectional data with functions for within/between transformations, lags, and differences.
  • Versatile Data Handling: Works seamlessly with various R data frame types (tibbles, data.tables, xts).
  • Use Case: When analyzing a large panel dataset with millions of rows and needing to compute group-wise means and standard deviations, r-collapse can perform these operations orders of magnitude faster than traditional methods.

Quick Start

Use the r-collapse skill to compute the mean of the 'value' column grouped by 'category' in the provided data.

Frequently Asked Questions about r-collapse

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I speed up grouped statistics in R for large datasets?

Weighted statistics in R are computed efficiently by passing weight parameters to collapse package functions, which leverage vectorized C/C++ code to handle high-speed weighted aggregation on panel data and large datasets.

Does the collapse package work with data.table and tibble objects in R?

The collapse package works seamlessly with various R data frame types including data.table, tibble, and xts formats, allowing you to apply high-performance transformations without converting between data structures.

What is the best way to perform within and between transformations on panel data in R?

Within and between transformations on panel data in R are handled natively by the collapse package, which provides optimized functions for time-series cross-sectional operations including lags and differences.

When should I use the collapse package instead of dplyr for data manipulation?

The collapse package should be used instead of dplyr when you encounter performance bottlenecks with large datasets exceeding 100k rows, requiring complex grouped or weighted statistical operations where dplyr is insufficient.

Can I compute time-series lags and differences efficiently with R panel data operations?

Time-series lags and differences with R panel data operations are computed efficiently using the collapse package, which provides specialized functions for time-series cross-sectional transformations on large datasets.