all.vars
returns all variables used in a formula. This
function only returns the variables explicitly used on the
right-hand side (i.e., it will not resolve dots unless the
object is terms with a data set specified).
form_pred(object, ...)
object | A model formula or |
---|---|
... | Arguments to pass to |
A character vector of names
form_pred(y ~ x + z)#> [1] "x" "z"#> [1] "x" "z"#> [1] "x" "z"#> [1] "x" "z"form_pred(y1 + y2 ~ x + z)#> [1] "x" "z"#> [1] "x" "z"#> [1] "cyl" "disp" "hp" "drat" "wt" "qsec" "vs" "am" "gear" "carb"#> [1] "mpg" "cyl" "disp" "hp" "drat" "wt" "qsec" "vs" "am" "gear" #> [11] "carb"