Converts a data frame of individual ages to give the index of the first infection that individual could have had

create_age_mask(DOBs, strain_isolation_times)

Arguments

DOBs

the vector of dates of birth, same time units as strain_isolation_times

strain_isolation_times

the vector of times that individuals can be infected

Value

a vector giving the first index of strain_isolation_times that an individual can be infected

Examples

data(example_titre_dat) data(example_antigenic_map) times <- example_antigenic_map$inf_times DOBs <- unique(example_titre_dat[,c("individual","DOB")]) age_mask <- create_age_mask(DOBs$DOB, times)