collapse-package

Advanced and Fast Data Transformation

Fast Statistical Functions

Fast (grouped and weighted) statistical functions for vector, matrix, data frame and grouped tibble (class ‘grouped_df’, dplyr compatible).

fast-statistical-functions

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

fmean()

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

fmedian()

Fast (Grouped, Weighted) Median Value for Matrix-Like Objects

fmode()

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

fsum()

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

fprod()

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

fvar() fsd()

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

fmax() fmin()

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

fnth()

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

ffirst() flast()

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

fNobs()

Fast (Grouped) Observation Count for Matrix-Like Objects

fNdistinct()

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

Fast Grouping and Ordering

Fast (ordered) groupings from vectors, data.frames, lists. Fast ordering, unique values / rows, factor generation and interactions, run-length type grouping and grouping of time-sequences.

fast-grouping-ordering

Fast Grouping and Ordering

GRP() is.GRP() GRPnames() as.factor_GRP() fgroup_by() gby() fgroup_vars() fungroup() print(<GRP>) plot(<GRP>)

Fast Grouping / collapse Grouping Objects

radixorder() radixorderv()

Fast Radix-Based Ordering

funique()

Fast Unique Elements / Rows

qF() qG() is.qG() as.factor_qG() finteraction()

Fast Factor Generation, Interactions and Vector Grouping

fdroplevels()

Fast Removal of Unused Factor Levels

groupid()

Generate Run-Length Type Group-Id

seqid()

Generate Group-Id from Integer Sequences

Fast Data Manipulation

Fast and flexible select, replace, add, subset, transform, sort / reorder and rename data / data frame columns.

fast-data-manipulation

Fast Data Manipulation

fselect() `fselect<-`() slt() `slt<-`() get_vars() gv() gvr() `get_vars<-`() `gv<-`() `gvr<-`() add_vars() `add_vars<-`() av() `av<-`() num_vars() `num_vars<-`() nv() `nv<-`() cat_vars() `cat_vars<-`() char_vars() `char_vars<-`() fact_vars() `fact_vars<-`() logi_vars() `logi_vars<-`() Date_vars() `Date_vars<-`()

Fast Select, Replace or Add Data Frame Columns

fsubset() sbt() ss()

Fast Subsetting Matrix-Like Objects

ftransform() ftransformv() tfm() tfmv() settransform() settransformv() settfm() settfmv() `ftransform<-`() `tfm<-`() fcompute()

Fast Transform and Compute Columns on a Data Frame

roworder() roworderv()

Fast Reordering of Data Frame Rows

colorder() colorderv()

Fast Reordering of Data Frame Columns

frename() setrename()

Fast Renaming Objects

Quick Data Conversion

Quick conversions between data.frame’s, data.table’s, tibbles, matrices, arrays, lists, vectors and factors - fast and flexible, without method dispatch or extensive checks.

qDF() qDT() qTBL() qM() as.numeric_factor() as.character_factor() mctl() mrtl()

Quick Data Conversion

qF() qG() is.qG() as.factor_qG() finteraction()

Fast Factor Generation, Interactions and Vector Grouping

Advanced Data Aggregation

Fast and easy multi-data-type, multi-function, weighted, parallelized and fully customized data aggregation.

collap() collapv() collapg()

Advanced Data Aggregation

Data Transformations

Efficient row- and column- apply to data objects and Split-Apply-Combine computing. Fast (grouped, weighted) replacing and sweeping out of statistics, scaling / standardizing, (quasi-)centering, higher-dimensional centering, linear prediction / partialling-out and linear model fitting.

data-transformations

Data Transformations

dapply()

Data Apply

BY()

Split-Apply-Combine Computing

TRA()

Transform Data by (Grouped) Replacing or Sweeping out Statistics

fscale() STD()

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

fbetween() fwithin() B() W()

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

fHDbetween() fHDwithin() HDB() HDW()

Higher-Dimensional Centering and Linear Prediction

flm()

Fast (Weighted) Linear Model Fitting

Time Series and Panel Series

Fast (sequences of) lags / leads, and (lagged / leaded, iterated, quasi-, log-) differences and (compounded) growth rates on (unordered) time series and panel data. Auto-, partial- and cross-correlation functions for panel data. Panel data to (ts-)array conversion.

time-series-panel-series

Time Series and Panel Series

flag() L() F()

Fast Lags and Leads for Time Series and Panel Data

fdiff() D() Dlog()

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

fgrowth() G()

Fast Growth Rates for Time Series and Panel Data

psacf() pspacf() psccf()

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

psmat() plot(<psmat>)

Matrix / Array from Panel Series

List Processing

Recursive list search / identification, extraction / subsetting, splitting, data-apply, and generalized recursive row-binding / unlisting in 2D.

list-processing

List Processing

is.regular() is.unlistable()

Regular Objects and Unlistable Lists

ldepth()

Determine the Depth / Level of Nesting of a List

atomic_elem() `atomic_elem<-`() list_elem() `list_elem<-`() reg_elem() irreg_elem() get_elem() has_elem()

Find and Extract / Subset List Elements

rsplit()

Recursive Splitting

rapply2d()

Recursively Apply a Function to a List of Data Objects

unlist2d()

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

Summary Statistics

Fast (grouped, weighted, panel-decomposed) summary statistics for cross-sectional and complex multilevel / panel data. A fast F-test for high-dimensional linear models.

summary-statistics

Summary Statistics

qsu() print(<qsu>)

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

descr() print(<descr>) as.data.frame(<descr>)

Detailed Statistical Description of Data Frame

pwcor() pwcov() pwNobs() print(<pwcor>) print(<pwcov>)

Pairwise Correlations, Covariances and Observation Count

varying()

Fast Check of Variation in Data

fFtest()

Fast F-test for Linear Models (with Factors)

Recode and Replace Values

Efficiently recode and replace values in matrix-like objects.

recode_num() recode_char() replace_NA() replace_Inf() replace_outliers()

Recode and Replace Values in Matrix-Like Objects

Small (Helper) Functions

Convenience functions that help to deal with variable names, labels, attributes, missing values, matching and object checking etc.. Some functions are performance improved replacements for base R functions.

.c() vlabels() `vlabels<-`() vclasses() vtypes() namlab() add_stub() rm_stub() `%!in%` ckmatch() fnlevels() fnrow() fncol() fdim() na_rm() na_omit() na_insert() cinv() all_identical() all_obj_equal() seq_row() seq_col() setRownames() setColnames() setDimnames() unattrib() setAttrib() copyAttrib() copyMostAttrib() is.categorical() is.Date()

Small (Helper) Functions

Data

Groningen Growth and Development Centre 10-Sector Database and World Bank World Development dataset.

GGDC10S

Groningen Growth and Development Centre 10-Sector Database

wlddev

World Development Dataset

Package Options

Global options affecting package operation.

collapse-options

collapse Package Options