Make a piecewise linear interpolating vector of Rt, for each day within the simulated interval. The assumed start of simulation is the first date provided in dates, and the end of simulation is the last date of dates unless max_date is provided. Interpolation is done with inclusive endpoints.

interpolate_rt(dates, rt, max_date = NULL)

Arguments

dates

a vector of Dates

rt

a vector of reproductive values at those dates

max_date

the maximum date of simulation (optional)

Value

a list with named elements Rt and Rt_tt, which can be provided to the get_parameters function's arguments R0 and tt_R0.