Learn R Programming

jollofR (version 0.6.5)

pyramid: pyramid: Produces population pyramid (graphs) of demographics (for cheesecake and cheesepop age-sex output data)

Description

This function creates population pyramid for age and sex output data from the 'cheesecake' or 'cheesepop' functions outputs. It could also be used to visualize observed age-sex compositions.

Usage

pyramid(female_pop, male_pop)

Value

A graphic image of age-sex population distribution pyramid

Arguments

female_pop

A data frame containing the disaggregated population estimates for females across all ages groups.

male_pop

A data frame containing the disaggregated population estimates for males across all ages groups.

Examples

Run this code
# \donttest{
if (requireNamespace("INLA", quietly = TRUE)) {
 data(toydata)
 result <- cheesecake(df = toydata$admin, output_dir = tempdir())
 pyramid(result$fem_age_pop,result$male_age_pop)
}
# }

Run the code above in your browser using DataLab