Learn R Programming

admiraldev (version 1.2.0)

extract_vars: Extract All Symbols from a List of Expressions

Description

Extract All Symbols from a List of Expressions

Usage

extract_vars(x, side = "lhs")

Value

A list of expressions

Arguments

x

An R object

side

One of "lhs" (the default) or "rhs" for formulas

See Also

Developer Utility Functions: %notin%(), %or%(), arg_name(), contains_vars(), convert_dtm_to_dtc(), filter_if(), friendly_type_of(), valid_time_units(), vars2chr()

Examples

Run this code
library(rlang)
extract_vars(exprs(PARAMCD, (BASE - AVAL) / BASE + 100))
extract_vars(AVAL ~ ARMCD + AGEGR1)
extract_vars(AVAL ~ ARMCD + AGEGR1, side = "rhs")

Run the code above in your browser using DataLab