evalSubFormula: Evaluate a part of a formula

View source: R/evalFormula.R

evalSubFormulaR Documentation

Evaluate a part of a formula

Description

Evaluate a part of a formula

Usage

evalSubFormula(x, data = NULL, ops = c("+", "&"), env = parent.frame())

Arguments

x

an object appearing as a subformula (typically a name or a call)

data

a data frame or environment in which things are evaluated

ops

a vector of operators that are not evaluated as operators but instead used to further split x

env

an environment in which to search for objects not in data.

Value

a data frame containing the terms of the evaluated subformula

Examples

if (require(mosaicData)) {
data(CPS85)
cps <- CPS85[1:6,]
cps
evalSubFormula( rhs( ~ married & sector), data=cps )
}

ProjectMOSAIC/mosaicCore documentation built on Nov. 10, 2023, 12:15 a.m.