Create a list environment
listenv(...)as.listenv(...)
as.listenv(...)
An environment of class listenv.
listenv
(optional) Named and/or unnamed objects to be assigned to the list environment.
x <- listenv(c = 2, a = 3, d = "hello") print(names(x)) names(x)[2] <- "A" x$b <- 5:8 y <- as.list(x) str(y) z <- as.listenv(y)
Run the code above in your browser using DataLab