This only renders output on timesteps that correspond to a day. See examples for how to quickly summarize the output.
compartments_age_render_process_daily(
renderer,
age,
compartments,
parameters,
dt
)
a individual::Render object
a individual::IntegerVariable object
a individual::CategoricalVariable object
model parameters
size of time step
if (FALSE) {
# if the renderer object is called comp_render
tmp <- as.data.table(comp_render$to_dataframe())
tmp <- melt(tmp,id.vars="timestep")
tmp1 <- tmp[, tstrsplit(variable, "_", keep = c(2, 4))]
tmp[ , variable := NULL]
tmp <- cbind(tmp, tmp1)
setnames(x = tmp,old = c("V1", "V2"),new = c("compartment","age"))
compartment_dt <- tmp[, .(value = sum(value)), by = .(compartment, timestep)]
}