Learn R Programming

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

collapse (version 1.0.0)

Advanced and Fast Data Transformation

Description

A C/C++ based package for advanced data transformation in R that is extremely fast, flexible and parsimonious to code with and programmer friendly. It is well integrated with 'dplyr', 'plm' and 'data.table'. --- Key Features: --- (1) Advanced data programming: A full set of fast statistical functions supporting grouped and/or weighted computations on vectors, matrices and data.frames. Fast (ordered) and reusable grouping, quick data conversions, and quick select, replace or add data.frame columns. (2) Advanced aggregation: Fast and easy multi-data-type, multi-function, weighted, parallelized and fully customized data aggregation. (3) Advanced transformations: Fast (grouped, weighted) replacing and sweeping out of statistics, scaling, centering, higher-dimensional centering, complex linear prediction and partialling-out. (4) Advanced time-computations: Fast (sequences of) lags / leads, and (lagged / leaded, iterated) differences and growth rates on (unordered) time-series and panel data. Multivariate auto, partial and cross- correlation functions for panel data. Panel data to (ts-)array conversions. (5) List Processing: (Recursive) list search / identification, extraction / subsetting, data-apply, and row-binding / unlisting in 2D. (6) Advanced data exploration: Fast (grouped, weighted, panel-decomposed) summary statistics for complex multilevel / panel data.

Copy Link

Version

Install

install.packages('collapse')

Monthly Downloads

38,990

Version

1.0.0

License

GPL (>= 2)

Maintainer

Sebastian Krantz

Last Published

March 19th, 2020

Functions in collapse (1.0.0)

A2-fast-grouping

Fast Grouping / collapse Grouping Objects
dapply

Data Apply
fbetween-fwithin-B-W

Fast Between (Averaging) and Within (Centering) Transformations
A3-select-replace-vars

Quick Select and Replace Data Frame Columns
fHDbetween-fHDwithin-HDB-HDW

Higher-Dimensional Centering and Linear Prediction
fdiff-fgrowth-D-G

Fast Differences and Growth Rates for Time-Series and Panel Data
fmax-fmin

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

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

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

Fast (Grouped, Weighted) Mean for Matrix-Like Objects
AA2-small-helpers

collapse Small (Helper) Functions
A8-list-processing

collapse List Processing
psacf

Auto- and Cross- Covariance and -Correlation Function Estimation for Panel-Series
fmedian

Fast (Grouped) Median Value for Matrix-Like Objects
BY

Split-Apply-Combine Computing
fNobs

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

Groningen Growth and Development Centre 10-Sector Database
ffirst-flast

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

Fast F-test of Linear Models (with Factors)
descr

Detailed Statistical Description of Data Frame
extract-list

Find and Extract / Subset List Elements
fscale-STD

Fast (Grouped, Weighted) Scaling and Centering of Matrix-like Objects
A0-collapse-documentation

Collapse Documentation & Overview
A5-advanced-aggregation

Advanced Data Aggregation
qsu

Fast (Grouped, Weighted) Summary Statistics for Cross-Sectional and Panel-Data
A6-data-transformations

collapse Data Transformations
flag-L-F

Fast Lags and Leads for Time-Series and Panel Data
fsum

Fast (Grouped) Sum for Matrix-Like Objects
AA1-recode-replace

Recode and Replace Values in Matrix-Like Objects
rapply2d

Recursively Apply a Function to a List of Data Objects
A1-fast-statistical-functions

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

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

Fast (Grouped) Product for Matrix-Like Objects
pwcor, pwcov, pwNobs

Pairwise Correlations, Covariances and Observation Count
ldepth

Determine the Depth / Level of Nesting of a List
is.regular-is.unlistable

Regular Objects and Unlistable Lists
wlddev

World Bank Development Data
A9-summary-statistics

collapse Summary Statistics
unlist2d

Recursive Row-Binding / Unlisting in 2D - to Data Frame
A4-quick-conversion

Quick Data Conversion
A7-time-series-panel-series

collapse Time-Series and Panel-Series
psmat

Matrix / Array from Panel-Series
collapse-package

Advanced and Fast Data Transformation
TRA

Transform Data by (Groupwise) Replacing or Sweeping out Statistics