Description Usage Arguments Examples
View source: R/ComputeAgeRatios.R
This function computes an age ratio, defined as asdf
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ComputeAgeRatios(
data,
name.disaggregations,
name.age,
name.sex,
name.males,
name.females,
name.population.year1,
name.population.year2,
name.year1,
name.month1,
name.day1,
name.year2,
name.month2,
name.day2
)
|
data |
data frame that contains at least seven columns representing: (1) five-year age groups, (2) sex, (3, 4) population counts collected at two different time points (typically adjacent Census years) (5, 6) dates of two different time points (7) the level of subnational disaggregation in additino to sex (e.g. a geographic unit such as a province/state, a sociodemographic category such as education level, or combinations thereof). |
name.disaggregations |
Character string providing the name of the variable in 'data' that represents the levels of subnational disaggregation |
name.age |
Character string providing the name of the variable in 'data' that represents age |
name.sex |
Character string providing the name of the variable in 'data' that represents sex |
name.males |
Character string providing the name of the value of 'name.sex' variable that represents males |
name.females |
Character string providing the name of the value of 'name.sex' variable that represents females |
name.population.year1 |
Character string providing the name of the variable in 'data' that represents the population count in the earlier time period |
name.population.year2 |
Character string providing the name of the variable in 'data' that represents the population count in the later time period |
name.year1 |
Character string providing the name of the variable in 'data' that represents the year of the earlier of the two time periods (e.g. year of the earlier Census) |
name.month1 |
Character string providing the name of the variable in 'data' that represents the month of the earlier of the two time periods (e.g. month of the earlier Census) |
name.day1 |
Character string providing the name of the variable in 'data' that represents the day of the earlier of the two time periods (e.g. day of the earlier Census) |
name.year2 |
Character string providing the name of the variable in 'data' that represents the year of the later of the two time periods (e.g. year of the later Census) |
name.month2 |
Character string providing the name of the variable in 'data' that represents the month of the later of the two time periods (e.g. month of the later Census) |
name.day2 |
Character string providing the name of the variable in 'data' that represents the day of the later of the two time periods (e.g. day of the later Census) |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ecuador_age_ratios <- ComputeAgeRatios(data=ecuador_five_year_ages,
name.disaggregations="province_name",
name.age="age",
name.sex="sex",
name.males="m",
name.females="f",
name.population.year1="pop1",
name.population.year2="pop2",
name.year1="year1"
name.month1="month1",
name.day1="day1",
name.year2="year2",
name.month2="month2",
name.day2="day2")
head(ecuador_age_ratios)
tail(ecuador_age_ratios)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.