Analogous function for nest and unnest in tidyr.
unnest_col will automatically remove other list-columns except for the
target list-column (which would be unnested later).
Usage
nest_by(data, group = NULL, negate = FALSE)
unnest_col(data, col)
Arguments
data
data.table, nested or unnested
group
The variable for nest group, could recieve character vector or
regular expression.
negate
Applicable when the "group" parameter uses regular expression,
if TRUE, return non-matching elements.
col
The single variable of nested data to be unnested
Value
data.table, nested or unnested
Details
In the nest_dt, the data would be nested to a column named `ndt`,
which is short for nested data.table.