Description Usage Arguments Details Value Examples
Reduces the depth of a list or other object. Most non-atomic objects (matrix, data.frame, environments, etc.) are converted to a "list" in the first level flattening. Atomic vectors, functions, and other special objects return themselves.
1 |
x |
object of any class, but primarily designed for lists and other "deep" objects |
level |
numeric integer describing the depth at which to flatten the object. If |
... |
objects passed to methods |
flatten
maps itself to each object with the aggregate x
, combining
the results. Each time it is mapped, the level is reduced by 1. When level == 0
,
or an atomic vector or other special object is reached, flatten
returns
the object without mapping itself.
flatter object
1 2 3 4 5 6 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.