powered by
Evaluate a formula
evalFormula(formula, data = parent.frame(), subset, ops = c("+", "&"))
a list containing data frames corresponding to the left, right, and condition slots of formula
formula
a formula ( y ~ x | z) to evaluate
y ~ x | z
a data frame or environment in which evaluation occurs
an optional vector describing a subset of the observations to be used. Currently only implemented when data is a data frame.
a vector of operator symbols allowable to separate variables in rhs
if (require(mosaicData)) { data(CPS85) cps <- CPS85[1:6,] cps evalFormula(wage ~ sex & married & age | sector & race, data=cps) }
Run the code above in your browser using DataLab