note that this will lead to row duplication if the unnested variables have multiple entries per row of the dt
data frame
also note that this will remove rows that have NULL in the nested_data column
unnest_select_data( dt, select = everything(), nested_data = nested_data, keep_remaining_nested_data = TRUE, keep_other_list_data = TRUE, keep_only_unique = TRUE )
select | which columns to unnest - use |
---|---|
nested_data | which column to unnest the |
keep_remaining_nested_data | whether to keep any remaining parts of the partially unnested data (irrelevant if |
keep_other_list_data | keep other list data columns (e.g. other data or model columns) |