Skip to contents

Calculate some stats about referrals

Usage

wl_referral_stats(
  waiting_list,
  start_date = NULL,
  end_date = NULL,
  referral_index = 1
)

Arguments

waiting_list

dataframe. A df of referral dates and removals

start_date

date. The start date to calculate from

end_date

date. The end date to calculate to

referral_index

the column index of referrals

Value

dataframe. A df containing number of referrals, mean demand, and the coefficient of variation of referrals

Examples

referrals <- c.Date("2024-01-01", "2024-01-04", "2024-01-10", "2024-01-16")
removals <- c.Date("2024-01-08", NA, NA, NA)
waiting_list <- data.frame("referral" = referrals, "removal" = removals)
referral_stats <- wl_referral_stats(waiting_list)