Description Usage Arguments Details Value Note
A mini-utility package for turning nested lists into data.frames.
A recombinator attempts to convert a depth 2 nested list into
a data.frame
.
1 | recombinator(dat, id = "id")
|
dat |
list. The list of lists to process. It can be in homogeneous or heterogeneous format (see the description). |
id |
character. Primary key, by default |
There are two supported formats.
Homogeneous lists A list where the first list element is a character vector giving the names of the data.frame, and the subsequent list elements themselves lists of values.
Heterogeneous lists A list where each element is a named
list of values. In this format, plyr::rbind
will be used
to take the union of all names and impute the ones missing
with NA
values.
the converted data.frame. If not a list, no changes will be performed.
A warning will be issued if non-standard names (i.e. those containing more than alphanumeric, underscore, and period characters) are used.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.