age_pyramid.population: 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 population
age_pyramid(object, time = 0, ages = c(0:110, Inf), ...)
Value
An object of class pyramid containing the age pyramid of the given population at instant time.
Arguments
object
Object of population class representing a population.
time
The age pyramid is computed at instant time. Must be a numeric greater than or equal to 0.
ages
(Optional) A numeric vector of distinct positive values composing age groups. Must be in increasing order.