View source: R/fert_helper_functions_wpp.R
fert_mac | R Documentation |
This function computes the mean age at childbearing from the age-specific fertility rates of a given period.
fert_mac(fert_data_age, byvar)
fert_data_age |
data frame. columns "age_start" and "age_span" describe age group of mother and "value" is age-specific fertility rates in births per woman. |
byvar |
character. string of column names in fert_data_age by which mac will be computed. |
accomodates any width of age interval (age_span) so long as it is constant over age.
a data frame with mean age at childbearing in the "value" field, computed by byvar columns.
Sara Hertog
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.