Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

extract_vars

Extract Variables from a Formula


Description

Given a formula() f, returns all variables used on the left-hand side and right-hand side of the formula.

Usage

extract_vars(f)

Arguments

f

(formula()).

Value

(list()) with elements "lhs" and "rhs", both character().

Examples

extract_vars(Species ~ Sepal.Width + Sepal.Length)
extract_vars(Species ~ .)

mlr3misc

Helper Functions for 'mlr3'

v0.10.0
LGPL-3
Authors
Michel Lang [cre, aut] (<https://orcid.org/0000-0001-9754-0393>), Patrick Schratz [aut] (<https://orcid.org/0000-0003-0748-6624>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.