[R] is there a way to recursilvely lapply
ggrothendieck at gmail.com
Thu Dec 11 21:03:23 CET 2008
This will recursively lapply and may or may not be
what you are looking for:
On Thu, Dec 11, 2008 at 2:59 PM, Whit Armstrong
<armstrong.whit at gmail.com> wrote:
> for a simple example:
> x <- list()
> x[["a"]] <- list(a=c(1,2,3),b=c(3,4,5))
> x[["b"]] <- list(a=c(6,7,8),b=c(9,10,11))
> this fails w/
> Error in FUN(X[[1L]], ...) : invalid 'type' (list) of argument
> Just wondering if I have overlooked something obvious.
> one can also do:
> but that assumes that you already know how many levels you have, and
> that all the levels are consistent.
> R-help at r-project.org mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help