Add time indexing to count data
Usage
add_time_indexing(input_count_data)
Arguments
- input_count_data
data frame with dates and counts,
but without time indexing.
Value
The same data frame, with an added
time index, including NA rows if dates internal
to the timeseries are missing admissions data.
Examples
hosp_data_example <- tibble::tibble(
date = lubridate::ymd("2024-01-01", "2024-01-02", "2024-01-06"),
daily_hosp_admits = c(5, 3, 8)
)
hosp_data_w_t <- add_time_indexing(hosp_data_example)