-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Description
Need something to turn a list of lists to a matrix, and possibly to a df.
Say we have df$var <- list(list(key1="val1"), list(key1="this", key2="that")).
flatten(df$var) should give a matrix/df with column names = c("key1", "key2"), with values and missing values filled with NA.
This function (http://www.inside-r.org/packages/cran/plyr/docs/rbind.fill.matrix) is going to handy. See also http://stackoverflow.com/questions/18960541/r-flatten-variably-sized-list-of-lists-to-data-frame
Reactions are currently unavailable