process_overlaps_of_time_intervals: process_overlaps_of_time_intervals

process_overlaps_of_time_intervalsR Documentation

process_overlaps_of_time_intervals

Description

process_overlaps_of_time_intervals

Usage

process_overlaps_of_time_intervals(
  time_interval_df,
  .y,
  time_interval_col,
  keep_spell = "longest",
  cols_to_combine = NA,
  combined_col_name = "combined_columns",
  remove_input_cols_flag = TRUE
)

Arguments

time_interval_df

a dataframe with lubridate time interval data +/- other columns

.y

the key, see notes for dplyr::group_modify

time_interval_col

the column name of the column holding the time interval data

keep_spell

c("longest", "shortest") how to process overlapping time intervals, keep longest or shortest

cols_to_combine

when there are overlaps in the time intervals, which column should be combined (into a list)

combined_col_name

the name of the column that will be returned containing the data in columns listed in col_to_combine

remove_input_cols_flag

TRUE/FALSE whether or not to remove the original columns that have been combined

Value

a dataframe with overlapping time intervals removed +/- aggregation of cols_to_combine into a single column


nicksunderland/acsprojectns documentation built on July 20, 2023, 7:23 p.m.