Skip to contents

Table 5.3 Deaths by place of occurrence and place of usual residence of decedent (males)

Table 5.4 Deaths by place of occurrence and place of usual residence of decedent (females)

Variables needed per record:

- `dodyr`: Year of death.

- `death1c`: Region of death.

- `death2o`: Region of usual residence.

- `death2c`: Sex of the deceased.

Usage

create_t5.3_and_t5.4(
  data,
  sex_filter = "male",
  date_var = "dodyr",
  data_year = NA,
  tablename = "Table_5_3",
  output_path = NULL
)

Arguments

data

Death records data frame.

sex_filter

Sex to filter by. Defaults to "male".

date_var

Event year column of the dataframe. Defaults to "dodyr".

data_year

The year to report on. Defaults to the last in the data.

tablename

Name of the table to be saved as a csv file. Optional.

output_path

The path to export the generated csv table. Optional.

Value

A data frame of tabulated results

Examples

death_data <- construct_sample_death_data()
death_data <- construct_year(death_data, date_col = "death1a", year_col = "dodyr")
table_5_3 <- create_t5.3_and_t5.4(death_data, data_year = 2022)