Vectorial version in time of the function age_pyramid
. Not compatible with IBMs including swap events.
age_pyramids(population, time = 0, ages = c(0:110, Inf))
Population data frame: characteristics in columns and individuals in rows. At least two columns birth
(dates of birth) and death
(dates of death) are required.
The age pyramid is computed at instants time
. Must be a numeric vector of greater than or equal to 0.
(Optional) A numeric vector of distinct positive values composing age groups. Must be in increasing order.
For convenience. This is a just a lapply
call of age_pyramid
on the vector time
.