checkFormula: Check variables in a formula

View source: R/misc.R

checkFormulaR Documentation

Check variables in a formula

Description

Check that variables in formula are present in the data

Usage

checkFormula(formula, data)

Arguments

formula

formula of variables to check

data

data.frame storing variables in the formula

Value

If formula is valid, return TRUE. Else throw error

Examples


# Valid formula
dreamlet:::checkFormula(~speed, cars)

# Not valid formula
# dreamlet:::checkFormula( ~ speed + a, cars)


GabrielHoffman/dreamlet documentation built on May 20, 2024, 2:05 p.m.