unnest | R Documentation |
Each element of a list that is itself a list
and does not have a name but has exactly one element
that DOES have a name should become that element
and have that name (recursively, from depth).
Collapses uninformative levels of nested lists.
Formerly used in as_yam; now superceded by parsimonious.list
.
unnest(x, ...)
x |
object |
named list
Other unnest:
unnest.default()
,
unnest.list()
# yaml.load reads this as a list of two un-named lists whose elements are named.
str(yaml::yaml.load('[foo: 1, bar: 3]'))
# yamlet treats it as a list of two named integers.
str(unnest(yaml::yaml.load('[foo: 1, bar: 3]')))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.