flag_heroin_present: Creates a new column called heroin_present if opioid death...

View source: R/flag_heroin_present.R

flag_heroin_presentR Documentation

Creates a new column called heroin_present if opioid death involved heroin

Description

Heroin deaths were recorded in both ICD-9 and ICD-10 years. This creates a new column to flag when that death involved heroin and was an opioid death as defined by flag_opioid_death().

Usage

flag_heroin_present(processed_df, year = NULL, keep_cols = FALSE)

Arguments

processed_df

MCOD dataframe already processed

year

if NULL, will attempt to detect

keep_cols

keep intermediate columns

Value

a new dataframe with a binary heroin_present column


mkiang/narcan documentation built on Sept. 26, 2024, 7:18 a.m.