subset_mortality_period: Subset Mortality Period

View source: R/subset_mortality_period.R

subset_mortality_periodR Documentation

Subset Mortality Period

Description

Intended to be used on a standardized mortality dataset which additionally captured dates of different demographic events such as joins, lefts, births and deaths. It will dynamically subset the data between a specified start and end of the recall period, and either include or exclude people, and calculate their estimated person time observed.

Usage

subset_mortality_period(df, start_date, end_date)

Arguments

df

Inputs a dataframe that has already been standardized by the format_current_census_mortality function.

start_date

Inputs a character value of a date of the start of the recall period, in a format like YYYY-MM-DD.

end_date

Inputs a character value of a date of the end of the recall period, in a format like YYYY-MM-DD.

Value

Returns a subsetted mortality dataset.

Examples

## Not run: subset_mortality_period(df = mymortalitydata, start_date = "2020-04-24", end_date = "2021-05-15")

SaeedR1987/healthyr documentation built on July 4, 2023, 11:17 p.m.