Learn R Programming

mosaic (version 1.9.1)

getVarFormula: Extract data from a data frame using a formula interface

Description

Uses the full model syntax.

Usage

getVarFormula(formula, data = parent.frame(), intercept = FALSE)

Arguments

formula

a formula. The right-hand side selects variables; the left-hand side, if present, is used to set row names. A . on the right-hand side indicates to use all variables not in the LHS.

data

a data frame

intercept

a logical indicating whether to include the intercept in the model default: FALSE (no intercept)

Examples

Run this code
getVarFormula( ~ wt + mpg, data = mtcars)

Run the code above in your browser using DataLab