R/monthly_beddays_and_admissions.R
monthly_beddays_and_admissions.Rd
Generate counts of beddays per month for an episode with an admission and discharge date Optionally these months can be between two supplied dates
monthly_beddays_and_admissions( data, admission_var, discharge_var, earliest_date = NA, latest_date = NA, pivot_longer = TRUE )
data | a tibble with date variables
|
---|---|
admission_var, discharge_var | the
|
earliest_date, latest_date | the earliest and latest dates (months) to compute new variables for |
pivot_longer | Should the data be left in wide form or pivoted to long form (default) |
a tibble with new variables