group_by_date: group_by_date

Description Usage Arguments Value

Description

group_by_date

Usage

1
2
group_by_date(df, date_col = "DischargeDate", cutoff_dates, new_col,
  period_labels)

Arguments

df

the dataframe

date_col

a date column in df

cutoff_dates

vector of dates

new_col

name for new column

period_labels

vector of character labels

Value

df with a new column added for the period date_col falls into for that row. Periods are defined by cutoff_dates and labelled by period_labels.


HorridTom/clahrcnwlhf documentation built on May 7, 2019, 4:02 a.m.