This function calculates the daily uptake for different age groups based on the provided calibration data frame.

calculate_daily_uptake(object, cal_df)

Arguments

object

An object containing the UK data with age group boundaries.

cal_df

A data frame containing the start and end dates, and uptake types for each age group.

Value

A matrix with 365 rows (days) and 25 columns (age groups) representing the daily uptake.

Details

The function processes each age group, calculates the start and end positions within the year, and fills the uptake matrix accordingly. Different uptake types such as "linear", "birth_rate", "flu_oa", and "oa_2425" are handled.

Examples

if (FALSE) { # \dontrun{
object <- your_object_with_uk_data
cal_df <- your_calibration_data_frame
daily_uptake_matrix <- calculate_daily_uptake(object, cal_df)
} # }