unnest_select_data: unnest parts of a data frame without loosing the rest

Description Usage Arguments

View source: R/utilities.R

Description

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

Usage

1
2
3
4
5
6
7
8
unnest_select_data(
  dt,
  select = everything(),
  nested_data = nested_data,
  keep_remaining_nested_data = TRUE,
  keep_other_list_data = TRUE,
  keep_only_unique = TRUE
)

Arguments

select

which columns to unnest - use c(...) to select multiple, supports all select syntax including renaming columns. Includes all columns by default (i.e. unnests an entire nested data frame).

nested_data

which column to unnest the select from

keep_remaining_nested_data

whether to keep any remaining parts of the partially unnested data (irrelevant if select = everything())

keep_other_list_data

keep other list data columns (e.g. other data or model columns)


KopfLab/isoprocessor documentation built on Nov. 6, 2021, 10:18 p.m.