Learn R Programming

mosaic (version 0.4-1)

evalSubFormula: Evaluate a part of a formula

Description

Evaluate a part of a formula

Usage

evalSubFormula(x, data = parent.frame(), split = c("&"))

Arguments

x
an object appearing as a subformula (typically a call)
data
a data fram or environment in which things are evaluated
split
a vector of operators that are not evaluated as operators but instead used to further split x

Value

  • a data frame containing the terms of the evaluated subformula

Examples

Run this code
data(CPS)
cps <- CPS[1:6,]
cps
evalSubFormula( rhs( ~ married & sector), data=cps )

Run the code above in your browser using DataLab