Learn R Programming

⚠️There's a newer version (2.1.1) of this package.Take me there.

collapse (version 2.0.14)

Advanced and Fast Data Transformation

Description

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'.

Copy Link

Version

Install

install.packages('collapse')

Monthly Downloads

30,211

Version

2.0.14

License

GPL (>= 2) | file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Sebastian Krantz

Last Published

May 24th, 2024

Functions in collapse (2.0.14)

arithmetic

Fast Row/Column Arithmetic for Matrix-Like Objects
across

Apply Functions Across Multiple Columns
GRP

Fast Grouping / collapse Grouping Objects
TRA

Transform Data by (Grouped) Replacing or Sweeping out Statistics
collap

Advanced Data Aggregation
collapse-options

collapse Package Options
collapse-package

Advanced and Fast Data Transformation
collapse-documentation

Collapse Documentation & Overview
BY

Split-Apply-Combine Computing
GGDC10S

Groningen Growth and Development Centre 10-Sector Database
fast-data-manipulation

Fast Data Manipulation
collapse-renamed

Renamed Functions
dapply

Data Apply
fFtest

Fast (Weighted) F-test for Linear Models (with Factors)
descr

Detailed Statistical Description of Data Frame
get_elem

Find and Extract / Subset List Elements
efficient-programming

Small Functions to Make R Programming More Efficient
fast-grouping-ordering

Fast Grouping and Ordering
data-transformations

Data Transformations
colorder

Fast Reordering of Data Frame Columns
fcount

Efficiently Count Observations by Group
fdroplevels

Fast Removal of Unused Factor Levels
fast-statistical-functions

Fast (Grouped, Weighted) Statistical Functions for Matrix-Like Objects
fgrowth

Fast Growth Rates for Time Series and Panel Data
fdiff

Fast (Quasi-, Log-) Differences for Time Series and Panel Data
fhdbetween-fhdwithin

Higher-Dimensional Centering and Linear Prediction
fbetween-fwithin

Fast Between (Averaging) and (Quasi-)Within (Centering) Transformations
ffirst-flast

Fast (Grouped) First and Last Value for Matrix-Like Objects
fdist

Fast and Flexible Distance Computations
fcumsum

Fast (Grouped, Ordered) Cumulative Sum for Matrix-Like Objects
fnth-fmedian

Fast (Grouped, Weighted) N'th Element/Quantile for Matrix-Like Objects
flm

Fast (Weighted) Linear Model Fitting
flag

Fast Lags and Leads for Time Series and Panel Data
fndistinct

Fast (Grouped) Distinct Value Count for Matrix-Like Objects
fmin-fmax

Fast (Grouped) Maxima and Minima for Matrix-Like Objects
fmatch

Fast Matching
fprod

Fast (Grouped, Weighted) Product for Matrix-Like Objects
fmean

Fast (Grouped, Weighted) Mean for Matrix-Like Objects
fmode

Fast (Grouped, Weighted) Statistical Mode for Matrix-Like Objects
ftransform

Fast Transform and Compute Columns on a Data Frame
funique

Fast Unique Elements / Rows
fnobs

Fast (Grouped) Observation Count for Matrix-Like Objects
fquantile

Fast (Weighted) Sample Quantiles and Range
fscale

Fast (Grouped, Weighted) Scaling and Centering of Matrix-like Objects
frename

Fast Renaming and Relabelling Objects
fvar-fsd

Fast (Grouped, Weighted) Variance and Standard Deviation for Matrix-Like Objects
fsubset

Fast Subsetting Matrix-Like Objects
fsum

Fast (Grouped, Weighted) Sum for Matrix-Like Objects
groupid

Generate Run-Length Type Group-Id
fsummarise

Fast Summarise
pad

Pad Matrix-Like Objects with a Value
pivot

Fast and Easy Data Reshaping
is_unlistable

Unlistable Lists
indexing

Fast Indexed Time Series and Panels
join

Fast Table Joins
qsu

Fast (Grouped, Weighted) Summary Statistics for Cross-Sectional and Panel Data
pwcor-pwcov-pwnobs

(Pairwise, Weighted) Correlations, Covariances and Observation Counts
qF-qG-finteraction

Fast Factor Generation, Interactions and Vector Grouping
quick-conversion

Quick Data Conversion
psacf

Auto- and Cross- Covariance and Correlation Function Estimation for Panel Series
summary-statistics

Summary Statistics
t_list

Efficient List Transpose
psmat

Matrix / Array from Panel Series
time-series-panel-series

Time Series and Panel Series
qtab

Fast (Weighted) Cross Tabulation
wlddev

World Development Dataset
rapply2d

Recursively Apply a Function to a List of Data Objects
group

Fast Hash-Based Grouping
ldepth

Determine the Depth / Level of Nesting of a List
list-processing

List Processing
rowbind

Row-Bind Lists / Data Frame-Like Objects
recode-replace

Recode and Replace Values in Matrix-Like Objects
timeid

Generate Integer-Id From Time/Date Sequences
unlist2d

Recursive Row-Binding / Unlisting in 2D - to Data Frame
radixorder

Fast Radix-Based Ordering
varying

Fast Check of Variation in Data
roworder

Fast Reordering of Data Frame Rows
rsplit

Fast (Recursive) Splitting
seqid

Generate Group-Id from Integer Sequences
fselect-get_vars-add_vars

Fast Select, Replace or Add Data Frame Columns
small-helpers

Small (Helper) Functions