This function generates and saves a plot of the dosing calendar for different age groups.

plot_calendar(object)

Arguments

object

An object containing the dosing calendar and other relevant data.

Value

None

Details

The function performs the following steps:

  • Checks if the directory for saving the plot exists, and creates it if it does not.

  • Extracts unique age groups from the economic data frame within the object.

  • Updates the column names of the dose calendar matrices to match the age groups.

  • Converts the dose calendar matrices into a data frame suitable for plotting.

  • Generates a ggplot of the dosing calendar, with days of the year on the x-axis, age groups on the y-axis, and the proportion of doses as the fill color.

  • Saves the plot as a PNG file in the specified directory.

Examples

if (FALSE) { # \dontrun{
plot_calendar(my_object)
} # }