flag_opioid_contributed: Flag non-opioid deaths that involved opioids

View source: R/flag_opioid_contributed.R

flag_opioid_contributedR Documentation

Flag non-opioid deaths that involved opioids

Description

Given an MCOD dataframe, will search through contributory causes for opioid related codes, but will only flag rows for which the underlying cause is **NOT** an opioid-related death.

Usage

flag_opioid_contributed(processed_df, year = NULL)

Arguments

processed_df

processed dataframe

year

if NULL, will attempt to detect

Details

NOTE: This function really doesn't make sense for ICD-9 years. Use with caution.

Value

new dataframe with an opioid_contributed column


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