
var_names(vars, data)
"var_names"(vars, data)
"var_names"(vars, data)
"var_names"(vars, data)
"var_names"(vars, data)
~ x1 + x2 + x3
all.vars
is used to extract all
variable names in a formula, and the special formula ~ .
is treated
differently: it means all variables in the data except thoese names starting
with a dot (e.g. .color
).
var_names(~., mtcars)
var_names(~disp + hp, mtcars)
var_names(1:3, mtcars)
Run the code above in your browser using DataLab