DRAFT utility to use formulas provided as text, to calculate indicators
Source:R/calc_ejam.R
calc_byformula.RdDRAFT utility to use formulas provided as text, to calculate indicators
Arguments
- mydf
data.frame of indicators or variables to use
- formulas
text strings of formulas, or a data.frame with columns
"rname"and"formula". Formula dependencies are sorted before evaluation. WARNING: this should not really be used on user-provided, untrusted formula strings, since the contents could potentially be a security risk- keep
useful if some of the formulas are just interim steps creating evanescent variables created only for use in later formulas and not needed after that
- quiet
if FALSE, prints to console the success/failure of each formula
Value
data.frame of results, but if mydf was a data.table, returns a table in data.table format
Details
custom_doaggregate()may usecalc_ejam()calc_ejam()usescalc_byformula()calc_byformula()usescalc_varname_from_formula()and maybe source_this_codetext()