
Function reference
-
collapse-package
collapse
- 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).
-
A1-fast-statistical-functions
fast-statistical-functions
.FAST_STAT_FUN
.FAST_FUN
- Fast (Grouped, Weighted) Statistical Functions for Matrix-Like Objects
-
fmean()
- Fast (Grouped, Weighted) Mean 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
-
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 and counts, factor generation and interactions, run-length type grouping and grouping of time-sequences.
-
A2-fast-grouping-ordering
fast-grouping-ordering
- Fast Grouping and Ordering
-
GRP()
is_GRP()
length(<GRP>)
GRPN()
GRPid()
GRPnames()
as_factor_GRP()
gsplit()
greorder()
fgroup_by()
gby()
fgroup_vars()
fungroup()
print(<GRP>)
plot(<GRP>)
- Fast Grouping / collapse Grouping Objects
-
radixorder()
radixorderv()
- Fast Radix-Based Ordering
-
group()
- Fast Hash-Based Grouping
-
funique()
fnunique()
fduplicated()
any_duplicated()
- Fast Unique Elements / Rows
-
qF()
qG()
is_qG()
as_factor_qG()
finteraction()
itn()
- 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
-
timeid()
- Generate Integer-Id From Time/Date Sequences
Fast Data Manipulation
Fast and flexible select, replace, add, subset, transform, sort / reorder and rename / relabel data / data frame columns.
-
A3-fast-data-manipulation
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
-
fsummarise()
fsummarize()
smr()
- Fast Summarise
-
fmutate()
mtt()
ftransform()
ftransformv()
tfm()
tfmv()
settransform()
settransformv()
settfm()
settfmv()
`ftransform<-`()
`tfm<-`()
fcompute()
fcomputev()
- Fast Transform and Compute Columns on a Data Frame
-
across()
- Apply Functions Across Multiple Columns
-
roworder()
roworderv()
- Fast Reordering of Data Frame Rows
-
colorder()
colorderv()
- Fast Reordering of Data Frame Columns
-
frename()
rnm()
setrename()
relabel()
setrelabel()
- Fast Renaming and Relabelling Objects
-
rowbind()
- Row-Bind Lists / Data Frame-Like Objects
-
join()
- Fast Table Joins
-
pivot()
- Fast and Easy Data Reshaping
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()
mctl()
mrtl()
as_numeric_factor()
as_character_factor()
- Quick Data Conversion
-
qF()
qG()
is_qG()
as_factor_qG()
finteraction()
itn()
- Fast Factor Generation, Interactions and Vector Grouping
Advanced Data Aggregation
Fast and easy multi-data-type, multi-function, weighted and parallelized data aggregation.
Data Transformations
Fast row / column arithmetic, efficient row / 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.
-
A6-data-transformations
data-transformations
.OPERATOR_FUN
- Data Transformations
-
`%rr%`
`%r+%`
`%r-%`
`%r*%`
`%r/%`
`%cr%`
`%c+%`
`%c-%`
`%c*%`
`%c/%`
- Fast Row/Column Arithmetic for Matrix-Like Objects
-
dapply()
- Data Apply
-
BY()
- Split-Apply-Combine Computing
-
fbetween()
fwithin()
B()
W()
- Fast Between (Averaging) and (Quasi-)Within (Centering) Transformations
-
fhdbetween()
fhdwithin()
HDB()
HDW()
- Higher-Dimensional Centering and Linear Prediction
Linear Models
Fast (weighted) linear model fitting. A fast F-test for high-dimensional linear models.
-
flm()
- Fast (Weighted) Linear Model Fitting
-
fFtest()
- Fast (Weighted) F-test for Linear Models (with Factors)
Time Series and Panel Series
Fast and flexible indexed time series and panel data classes. Fast (sequences of) lags / leads, and (lagged / leaded, iterated, quasi-, log-) differences and (compounded) growth rates on (irregular) time series and panel data. Auto-, partial- and cross-correlation functions for panel data. Panel data to (ts-)array conversion.
-
A7-time-series-panel-series
time-series-panel-series
- Time Series and Panel Series
-
findex_by()
iby()
findex()
ix()
unindex()
reindex()
is_irregular()
to_plm()
`[`(<indexed_series>)
`[`(<indexed_frame>)
`[<-`(<indexed_frame>)
`$`(<indexed_frame>)
`$<-`(<indexed_frame>)
`[[`(<indexed_frame>)
`[[<-`(<indexed_frame>)
`[`(<index_df>)
print(<index_df>)
- Fast Indexed Time Series and Panels
-
timeid()
- Generate Integer-Id From Time/Date Sequences
-
fcumsum()
- Fast (Grouped, Ordered) Cumulative Sum for Matrix-Like Objects
-
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, splitting, extraction/subsetting, apply, and generalized row-binding / unlisting to data frame.
-
A8-list-processing
list-processing
- List Processing
-
is_unlistable()
- 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()
- Fast (Recursive) Splitting
-
t_list()
- Efficient List Transpose
-
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 and descriptive tools.
-
A9-summary-statistics
summary-statistics
- Summary Statistics
-
qsu()
as.data.frame(<qsu>)
print(<qsu>)
- Fast (Grouped, Weighted) Summary Statistics for Cross-Sectional and Panel Data
-
descr()
as.data.frame(<descr>)
print(<descr>)
- Detailed Statistical Description of Data Frame
-
pwcor()
pwcov()
pwnobs()
print(<pwcor>)
print(<pwcov>)
- (Pairwise, Weighted) Correlations, Covariances and Observation Counts
-
varying()
- Fast Check of Variation in Data
Other Statistical
Fast euclidean distance computations, (weighted) sample quantiles, and range of vector.
-
fdist()
- Fast and Flexible Distance Computations
-
fquantile()
.quantile()
frange()
.range()
- Fast (Weighted) Sample Quantiles and Range
-
recode_num()
recode_char()
replace_NA()
replace_Inf()
replace_outliers()
- Recode and Replace Values in Matrix-Like Objects
-
pad()
- Pad Matrix-Like Objects with a Value
-
anyv()
allv()
allNA()
whichv()
whichNA()
`%==%`
`%!=%`
alloc()
copyv()
setv()
setop()
`%+=%`
`%-=%`
`%*=%`
`%/=%`
na_rm()
na_omit()
na_insert()
missing_cases()
vlengths()
vtypes()
vgcd()
fnlevels()
fnrow()
fncol()
fdim()
seq_row()
seq_col()
vec()
cinv()
- Small Functions to Make R Programming More Efficient
Small (Helper) Functions
Convenience functions to perform multiple-assignment, nonstandard concatenation, and deal with variable names, labels, other attributes, matching and object checking, and help with metaprogramming.
Data
Groningen Growth and Development Centre 10-Sector Database and World Bank World Development dataset.
-
set_collapse()
get_collapse()
- collapse Package Options