Closed cashoes closed 8 years ago
This seems like a very reasonable parallel to dplyr::bind_rows()
.
Hmmm, what happens if you're unnesting two named columns?
l <- lapply(1:5, function(x) runif(5))
names(l) <- LETTERS[1:5]
df <- dplyr::data_frame(x = 1:5, x = l, y = l)
unnest(df, x, y, .id = "names")
.id
could be a vector as long as the number of columns to unnest.
What if you want to use the names from one, but not another? I guess it could be a named vector, or you could use NAs.
You can also unnest in multiple steps in that case.
Currently takes single .id
string - seems like the job of de-duplication is part of #184 (and if that's not enough, you can always do multiple unnests).
When calling unnest on a named list, preserve names as an additional column. The name of the column should be specified by the .id argument.