flatten | R Documentation |
Flattens lists and nested lists of vectors, matrices, and/or data frames.
flatten(x)
x |
a list |
https://stackoverflow.com/q/8139677/2994949
l <- list(
matrix(1:3), list(1:3, 'foo'), TRUE, 'hi',
list(mtcars[1:5, 1:5], list(mtcars[1:5, 1:5]))
)
l
flatten(l)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.