Learn R Programming

mlr3misc (version 0.15.1)

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)

Value

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

Arguments

f

(formula()).

Examples

Run this code
extract_vars(Species ~ Sepal.Width + Sepal.Length)
extract_vars(Species ~ .)

Run the code above in your browser using DataLab