monthly_beddays_and_admissions: Generate counts of beddays per month for an episode with an...

Description Usage Arguments Value

View source: R/monthly_beddays_and_admissions.R

Description

Generate counts of beddays per month for an episode with an admission and discharge date Optionally these months can be between two supplied dates

Usage

1
2
3
4
5
6
7
8
monthly_beddays_and_admissions(
  data,
  admission_var,
  discharge_var,
  earliest_date = NA,
  latest_date = NA,
  pivot_longer = TRUE
)

Arguments

data

a tibble with date variables admission_date and discharge_date

admission_var, discharge_var

the admission_date and discharge_date variables

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)

Value

a tibble with new variables


Moohan/hscfunctions documentation built on Dec. 17, 2021, 4:20 a.m.