Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

evalFormula

Evaluate a formula


Description

Evaluate a formula

Usage

evalFormula(formula, data = parent.frame(), subset, ops = c("+", "&"))

Arguments

formula

a formula ( y ~ x | z) to evaluate

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

Value

a list containing data frames corresponding to the left, right, and condition slots of formula

Examples

if (require(mosaicData)) {
data(CPS85)
cps <- CPS85[1:6,]
cps
evalFormula(wage ~ sex & married & age | sector & race, data=cps)
}

mosaicCore

Common Utilities for Other MOSAIC-Family Packages

v0.9.0
GPL (>= 2)
Authors
Randall Pruim <rpruim@calvin.edu>, Daniel T. Kaplan <kaplan@macalester.edu>, Nicholas J. Horton <nhorton@amherst.edu>
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.