Skip to contents

A summary of all the key stats associated with a waiting list

Usage

wl_stats(
  waiting_list,
  target_wait = 4,
  categories = NULL,
  start_date = NULL,
  end_date = NULL,
  target_index = NULL
)

Arguments

waiting_list

dataframe. A df of referral dates and removals

target_wait

numeric. The required waiting time

start_date

date. The start date to calculate from

end_date

date. The end date to calculate to

Value

dataframe. A df of important waiting list statistics

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)
waiting_list_stats <- wl_stats(waiting_list)