get_vars {bazar} | R Documentation |
Get formula variables
Description
The function get_vars
extracts variable names from a formula.
Usage
get_vars(formula, data = NULL, intersection = TRUE)
Arguments
formula |
a formula. |
data |
data.frame or matrix. If not |
intersection |
logical. If |
Value
a character vector, the variables found.
See Also
Examples
get_vars(y ~ x1 + x2 - x1)
get_vars(y ~ . - x1, data = data.frame(y = 1, x1 = 2, x2 = 3))
get_vars(y + z ~ x1 + x2 - x1 | x3)
get_vars(y ~ x1 + I(log(x2)))
get_vars(y ~ x1*x2)
get_vars(y ~ x1:x2)
get_vars(~ x1 + x2)
[Package bazar version 1.0.11 Index]