Creates Tables 5.2
create_t5.2.Rd
This function generates Table 5.2, which shows deaths by place of usual residence and the sex of the deceased.
Usage
create_t5.2(
data,
date_var = "dodyr",
data_year = NA,
tablename = "Table_5_2",
output_path = NULL
)
Details
Variables needed per record:
- `dodyr`: Year of death.
- `death2o`: Region of usual residence.
- `death2c`: Sex of the deceased.
Examples
death_data <- construct_sample_death_data()
death_data <- construct_year(death_data, date_col = "death1a", year_col = "dodyr")
table_5_2 <- create_t5.2(death_data, date_var="dodyr", data_year = 2022)