Tools Inspired by Stata to Manipulate Tabular Data


[Up] [Top]

Documentation for package ‘statar’ version 0.3.0

Help Pages

statar-package A package for applied research
as.monthly Elapsed dates (monthly, quarterly)
as.quarterly Elapsed dates (monthly, quarterly)
compute_distance Find minimum distance of each word to other groups
count_combinations Find best string combinations that identify an id
discard Create a new data.table by discarding certain columns
discard_ Create a new data.table by discarding certain columns
discard_if Create new data.table after discarding certain rows
discard_if_ Create new data.table after discarding certain rows
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 a data.frame with duplicated rows
find_duplicates_ returns a data.frame with duplicated rows
fuzzy_join Experimental fuzzy join function
group Group multiple variable (similar to Stata group)
is.monthly Elapsed dates (monthly, quarterly)
is.panel Check whether data.table is a panel data
is.panel_ Check whether data.table is a panel data
is.quarterly Elapsed dates (monthly, quarterly)
join Join two data frames together
keep Create new data.table by keeping only certain columns (equivalent to dplyr::select)
keep_ Create new data.table by keeping only certain columns (equivalent to dplyr::select)
keep_if Create new data.table by keeping only certain rows(equivalent to dplyr::filter)
keep_if_ Create new data.table by keeping only certain rows(equivalent to dplyr::filter)
monthly Elapsed dates (monthly, quarterly)
pastem String and expression interpolation
pastem0 String and expression interpolation
pctile Weighted quantile of type 2 (similar to Stata _pctile)
quarterly, Elapsed dates (monthly, quarterly)
quotem String and expression interpolation
quotem_ String and expression interpolation
roll_lag Apply rolling functions within time intervals
roll_lead Apply rolling functions within time intervals
setdiscard discard certain columns in place
setdiscard_ discard certain columns in place
setkeep Keep only certain columns in place
setkeep_ Keep only certain columns in place
setna fill NA in place based on non missing observations
setna_ fill NA in place based on non missing observations
setpanel Check whether data.table is a panel data
setpanel_ Check whether data.table is a panel data
statar A package for applied research
stat_binmean Plot the mean of y over the mean of x within bins of x.
sum_up Gives summary statistics (corresponds to Stata command summarize)
sum_up_ Gives summary statistics (corresponds to Stata command summarize)
tab Returns cross tabulation
tab_ Returns cross tabulation
tag Creates a vector of zero except for one subscript
tempname Create unique names within a list, a data.frame, or an environment
tlag lead and lag with respect to a time variable
tlead lead and lag with respect to a time variable
tlead-tlag lead and lag with respect to a time variable
winsorise Winsorize a numeric vector
winsorize Winsorize a numeric vector
xtile Bin variable in groups (similar to Stata xtile)