Topics and Functions
Topic |
|
Main Features / Keywords |
|
Functions |
|
Fast Statistical Functions
|
Fast (grouped and weighted) statistical functions for vector, matrix, data.frame and grouped_df (dplyr compatible). |
|
fsum , fprod , fmean , fmedian , fmode , fvar , fsd , fmin , fmax , ffirst , flast , fNobs , fNdistinct |
|
|
|
Fast (Ordered) Grouping
|
Fast (ordered or unordered) groupings from vectors, data.frames, lists. 'GRP' objects are extremely efficient inputs for programming with collapse's fast functions. fgroup_by can attach them to a data.frame, also yielding a grouped computation when a fast function is called on it. In addition there is fast ordering, factor generation and interactions, generalized run-length type grouping and grouping of time-sequences.
|
|
GRP , radixorder , radixorderv , qF , qG , finteraction , groupid , seqid , as.factor.GRP , group_names.GRP , is.GRP , is.qG , fgroup_by , fgroup_vars |
|
|
|
Fast Data Frame Manipulation
|
Fast and flexible select, subset and transform data, including modifying columns by reference and computing columns saved as a new dataset. In addition a set of functions for fast selecting, and replacing or adding variables (columns) from/to data.frames, including shortcuts to select and replace variables by type.
|
|
fselect , fsubset/ss , ftransform , settransform , fcompute , get_vars , add_vars . num_vars , cat_vars , char_vars , fact_vars , logi_vars , Date_vars |
|
Quick Data Conversion
|
Quick conversions: data.frame <> data.table | matrix <> list, data.frame, data.table | array > matrix, data.frame, data.table | list > data.frame, data.table | vector > factor, matrix, data.frame, data.table. |
|
qDF , qDT , qM , qF , mrtl , mctl |
|
|
|
Advanced Data Aggregation
|
Fast and easy (weighted and parallelized) aggregation of multi-type data, with (multiple) functions applied to numeric and categorical columns. Also supports fully customized aggregation tasks mapping functions directly to columns. |
|
collap , collapv , collapg |
|
|
|
Data Transformations
|
Efficient row- and column- data-apply and Split-Apply-Combine computing. Fast (grouped and weighted) replacing and sweeping of statistics, scaling / standardizing, (higher-dimensional) within- and between-transformations (i.e. centering and averaging), complex linear prediction and partialling out. A fast F-test for linear models with (large) factors. Additional methods for grouped_df (dplyr) and pseries, pdata.frame (plm). |
|
dapply , BY , TRA , fscale/STD , fbetween/B , fwithin/W , fHDbetween/HDB , fHDwithin/HDW , fFtest |
|
|
|
Time-Series and Panel-Series
|
Fast (sequences of) lags / leads and (lagged / leaded and iterated) differences, quasi-differences, (quasi-) log-differences and growth rates on (unordered) time-series and panel-data. Panel-data to (ts-)array conversions. Multivariate panel- auto-, partial- and cross- correlation functions. Additional methods for grouped_df (dplyr) and pseries, pdata.frame (plm). |
|
flag/L/F , fdiff/D/Dlog , fgrowth/G , psmat , psacf , pspacf , psccf |
|
List Processing
|
(Recursive) list search and identification, search and extract list-elements / list-subsetting, rapply to lists of data.frame's / data objects, and (fast) generalized recursive row-binding / unlisting in 2-dimensions / to data.frame. |
|
is.regular , is.unlistable , ldepth , has_elem , get_elem , atomic_elem , list_elem , reg_elem , irreg_elem , rapply2d , unlist2d |
|
Summary Statistics
|
Extremely fast (one-pass, grouped and weighted), summary statistics for cross-sectional and complex multilevel / panel data, with additional methods for pseries and pdata.frame (plm). Efficient detailed description of data.frame. Fast check of variation in data (within groups / dimensions). Pairwise correlations and covariances (with observation count, p-value and pretty printing), pairwise observation count. |
|
qsu , descr , varying , pwcor , pwcov , pwNobs |
|
|
|
|
Recode and Replace Values
|
Recode multiple values (exact or regex matching) and replace NaN/Inf/-Inf and outliers (according to 1- or 2-sided threshold or column standard-deviation) in vectors, matrices or data.frames. |
|
recode_num , recode_char , replace_NA , replace_Inf , replace_outliers |
|
|
|
Small (Helper) Functions
|
Set and extract variable labels, extract variable classes and C storage types, display variable names, labels and classes, add / remove prefix or postfix to / from column names, not-in operator, matching with error message for non-matched, faster nlevels for factors, fast unique vector elements, fast nrow, ncol, dim for data.frames, remove NA 's from vector, fast na.omit, insert NA 's at random into matrix-like objects, check exact or near / numeric equality of multiple objects or of all elements in a list, seq_along rows or columns of matrix-like objects, return object with dimnames, row- or colnames set, or with all attributes removed, identify categorical and date(-time) objects, convert factors (or all factors in a list) to numeric or character by converting levels. |
|
vlabels , vclasses , vtypes , namlab , add_stub , rm_stub , %!in% , ckmatch , fnlevels , funique , fnrow , fncol , fdim , na_rm , na_omit , na_insert , all_identical , all_obj_equal , seq_row , seq_col , setDimnames , setRownames , setColnames , unattrib , is.categorical , is.Date , as.numeric_factor , as.character_factor |
|
|
|
Data and Global Macros
|
Groningen Growth and Development Centre 10-Sector Database, World Bank World Development dataset, and some global macros containing links to the topical documentation pages (including this page), all exported objects (excluding exported S3 methods), all generic functions, the 2 datasets, all fast functions, all fast statistical (scalar-valued) functions, and all transformation operators / operator-like functions. |
|
GGDC10S, wlddev, .COLLAPSE_TOPICS, .COLLAPSE_ALL, .COLLAPSE_GENERIC, .COLLAPSE_DATA, .FAST_FUN, .FAST_STAT_FUN, .OPERATOR_FUN |
|
Global Options
|
Set the action taken by generic functions encountering unknown arguments. The default is "warning" . Other choices are "error" , "message" or "none" , where "none" enables silent swallowing. |
|
options(collapse_ unused_arg_action) |
Topic |
|
Main Features / Keywords |