powered by
Transforms each element of a list columns into its own column, possibly by reference.
unnest(x, cols, prefix = NULL)
:: data.table::data.table() data.table::data.table() with columns to unnest.
data.table::data.table()
:: character() Column names of list columns to operate on.
character()
:: character(1) String to prefix the new column names with.
character(1)
(data.table::data.table()).
# NOT RUN { x = data.table::data.table( id = 1:2, value = list(list(a = 1, b = 2), list(a = 2, b = 2)) ) print(x) unnest(x, "value") # }
Run the code above in your browser using DataLab