age_pyramid.population {IBMPopSim} | R Documentation |
Age pyramid from a population at a given time.
Description
Reduce a population containing all individuals (with some characteristics) to an age-groups data frame (preserving characteristics). The function computes the number of individuals at time
in each age group [ages[i],ages[i+1][
, for i
in {1,...,N-1}
.
Usage
## S3 method for class 'population'
age_pyramid(object, time = 0, ages = c(0:110, Inf), ...)
Arguments
object |
Object of |
time |
The age pyramid is computed at instant |
ages |
(Optional) A numeric vector of distinct positive values composing age groups. Must be in increasing order. |
... |
Additional parameters |
Value
An object of class pyramid
containing the age pyramid of the given population at instant time
.
See Also
Examples
age_pyramid(population(EW_pop_14$sample), time = 0)
age_pyramid(population(EW_popIMD_14$sample), time = 0, ages = seq(0, 120, by=2))
[Package IBMPopSim version 1.0.0 Index]