collect | R Documentation |
This function takes a list of lists where each inner list has the same names. It returns a list where each element corresponds to a name of the inner list that is extracted from each inner list. Especially useful for collecting results from lapply.
collect(xx)
xx |
A list of lists where each inner list has the same names. |
A list where each element corresponds to a name of the inner list that is extracted from each inner list.
xx <- lapply(1:3, function(i) list(a = i, b = i^2, c = i^3))
ret <- collect(xx)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.