evalFormula | R Documentation |
Evaluate a formula
evalFormula(formula, data = parent.frame(), subset, ops = c("+", "&"))
formula |
a formula ( |
data |
a data frame or environment in which evaluation occurs |
subset |
an optional vector describing a subset of the observations to be used. Currently only implemented when data is a data frame. |
ops |
a vector of operator symbols allowable to separate variables in rhs |
a list containing data frames corresponding to the left, right, and condition
slots of formula
if (require(mosaicData)) {
data(CPS85)
cps <- CPS85[1:6,]
cps
evalFormula(wage ~ sex & married & age | sector & race, data=cps)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.