Extract variables from a named list
extract_vars.Rd
Extract variables from a named list
Usage
extract_vars(
x,
...,
keep = FALSE,
allow_nonexisting = FALSE,
env = parent.frame()
)
Arguments
- x
A named list
- ...
The names of the variables named arguments are allowed to rename the variables.
b = "a"
will extracta
and assign it tob
- keep
Keep the extracted variables in the list
- allow_nonexisting
Allow non-existing variables, if
TRUE
, it will not throw an error if the variable is not found IfFALSE
, it will throw an error if the variable is not found. The non-existing variables will be extracted asNULL
.- env
The environment to assign the extracted variables