Tools inspired by Stata to manipulate tabular data


[Up] [Top]

Documentation for package ‘statar’ version 0.1.3

Help Pages

statar-package A package for applied research
as.monthly Elapsed dates (monthly, quarterly)
as.quarterly Elapsed dates (monthly, quarterly)
bin Bin a numeric vector and return integer codes for the binning (corresponds to Stata command xtile)
demean Demean a vector
elapsed Elapsed dates (monthly, quarterly)
evalm String and expression interpolation
fill_gap Add rows corresponding to gaps in some variable
fill_gap_ Add rows corresponding to gaps in some variable
find_duplicates returns duplicated rows
find_duplicates_ returns duplicated rows
floor_date floor_date Round date-times down.
graph Experimental function to graph a dataset
graph_ Experimental function to graph a dataset
is.monthly Elapsed dates (monthly, quarterly)
is.quarterly Elapsed dates (monthly, quarterly)
join Join two data.tables together
lag.default lead and lag with respect to a time variable
lead lead and lag with respect to a time variable
lead-lag lead and lag with respect to a time variable
monthly Elapsed dates (monthly, quarterly)
pastem String and expression interpolation
pastem0 String and expression interpolation
quarterly, Elapsed dates (monthly, quarterly)
quotem String and expression interpolation
quotem_ String and expression interpolation
roll_lag Apply rollling functions with respect to a time variable
roll_lead Apply rollling functions with respect to a time variable
sample_mode Statistical mode
setdrop Drop certain columns in place
setdrop_ Drop certain columns in place
setkeep Keep only certain columns in place
setkeep_ Keep only certain columns in place
setmutate Version of mutate that (i) transforms data.table in place (ii) allows by, i condition
setmutate_ Version of mutate that (i) transforms data.table in place (ii) allows by, i condition
setmutate_each Version of mutate_each that (i) transforms data.table in place (ii) allows by, i condition (iii) when only when fun, creates new variables - except when replace = TRUE
setmutate_each_ Version of mutate_each that (i) transforms data.table in place (ii) allows by, i condition (iii) when only when fun, creates new variables - except when replace = TRUE
setna fill NA in place based on non missing observations
setna_ fill NA in place based on non missing observations
statar A package for applied research
sum_up Gives summary statistics (corresponds to Stata command summarize)
sum_up_ Gives summary statistics (corresponds to Stata command summarize)
tag Creates a vector of zero except for one subscript
tempname Create unique names within a list, a data.frame, or an environment
winsorise Winsorize a numeric vector
winsorize Winsorize a numeric vector