Creates Table 5.11
create_t5.11.Rd
Table 5.11 Deaths by year of occurrence and sex (Defaults to Foetal Deaths).
Variables needed per record:
- `dodyr`: Year of death.
- `death1j`: Foetal death Identifier. Optional.
- `death2c`: Sex of the deceased.
Usage
create_t5.11(
data,
foetal_filter = "Yes",
num_yrs = 5,
date_var = "dodyr",
data_year = NA,
tablename = "Table_5_11",
output_path = NULL
)
Arguments
- data
Death records data frame.
- foetal_filter
Flag to filter deaths. Defaults to "Yes". Can be NULL.
- 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.
- num_years
Number of years to include in the table. Defaults to 5.
Examples
death_data <- construct_sample_death_data()
death_data <- construct_year(death_data, date_col = "death1a", year_col = "dodyr")
table_5_11 <- create_t5.11(death_data, foetal_filter = NULL, date_var= "dodyr")