e2l {str2str} | R Documentation |
Environment to List
Description
e2l
converts an environment to a list. The function assumes you don't
want *all* objects in an environment and uses pick
to determine which
objects you want included. If you want all objects in an environment, then use
grab(x = objects(envir, all.names = TRUE), envir)
.
Usage
e2l(
e = sys.frame(),
val,
pat = FALSE,
not = FALSE,
fixed = FALSE,
sorted = FALSE,
check = TRUE
)
Arguments
e |
environment to pull the objects from. Default is the global environment. |
val |
character vector specifying which objects from |
pat |
logical vector of length 1 specifying whether |
not |
logical vector of length 1 specifying whether |
fixed |
logical vector of length 1 specifying whether |
sorted |
logical vector of length 1 specifying whether the objects should
be sorted alphanumerically. If FALSE, the objects are usually in the order they
were initially created, but not always (see |
check |
logical vector of length 1 specifying whether to check the structure
of the input arguments. For example, check whether |
Value
list with object contents from environment e
with names as the
object names.
Examples
model_1 <- lm(v2frm(names(attitude)), data = attitude)
model_2 <- lm(v2frm(names(mtcars)), data = mtcars)
model_3 <- lm(v2frm(names(airquality)), data = airquality)
e2l(val = "model_", pat = TRUE)