Recombinate Nested Lists to Dataframes

Turns nested lists into data.frames in an orderly manner.

An R utility for turning nested lists into data.frames. This can be useful for turning JSON into R lists, and then into data.frames.


The latest stable build can be downloaded from CRAN:


To install the latest development builds directly from GitHub, run this instead:

if (!require("devtools")) install.packages("devtools")


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.

Here are two examples of the respective format:

recombinator(list(c("a","b","c"), list(1, F, 2), list(2, T, 3)))
# 1 1 FALSE 2
# 2 2  TRUE 3
recombinator(list(c("a","b","c"), list(1, F, 2), list(2, T, 3)))
# recombinator(list(list(a = 1, b = F, c = 2), list(a = 2, b = T, c = 3)))
#  a     b c
# 1 1 FALSE 2
# 2 2  TRUE 3
# The union of all observed keys is used for column names.
recombinator(list(list(a = 1, b = F, c = 2), list(a = 2, b = T, d = 4)))
#   a     b  c  d
# 1 1 FALSE  2 NA
# 2 2  TRUE NA  4


Version 1.0.1

  • Re-release for CRAN.
  • Updated Travis. Added linter and fixed linter errors.

Version 1.0.0

  • Create a CRAN ready version of the package.

Version 0.1.3

  • Recombinator calls out to homogeneous recombinator correctly for depth-0 lists. Resolves #8.

Version 0.1.2

  • Recombinator calls out to homogeneous recombinator correctly when the names are a list within a list (instead of a vector). Resolves #6.

Version 0.1.1

  • Recombinator now returns non-list data idempotently. Resolves #3.

Version 0.1.0

  • The initial creation of the package.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


1.0.1 by Peter Hurford, 2 years ago

Browse source code at

Authors: Peter Hurford [aut, cre] , Robert Krzyzanowski [aut]

Documentation:   PDF Manual  

MIT + file LICENSE license

Imports stats, crayon

Suggests testthat

See at CRAN