central_death_rate | R Documentation |
Adds a new column called CentralDeathRate to the dataset that was input. This column represents the central death rate of each age group - deaths/population.
central_death_rate(data, age, pop, deaths)
data |
The mortality dataset, includes an age grouping variable, |
age |
The age grouping variable, must be categorical |
pop |
Population of each age group, must be numeric |
deaths |
The midyear number of deaths at each age group, must be numeric |
Data frame that was input with an added CentralDeathRate column.
# This function adds a CentralDeathRate column to the dataset
central_death_rate(mortality2, "age_group", "population", "deaths")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.