HenrikBengtsson / listenv

R package: listenv - Environments Behaving As Lists
https://listenv.futureverse.org
30 stars 2 forks source link

Add unlist() #9

Closed HenrikBengtsson closed 9 years ago

HenrikBengtsson commented 9 years ago

Add unlist(x) for listenv x to effectively be equivalent to unlist(as.list(x)), e.g.

> unlist.listenv <- function(x, ...) unlist(as.list(x), ...)

> x <- as.listenv(1:3)
> x
`listenv` with 3 elements that are not named.
> unlist(x)
[1] 1 2 3

However, it could be implemented more efficiently that the above.