flag_opium_present: Creates a column called 'opium_present' if opioid death...

View source: R/flag_opium_present.R

flag_opium_presentR Documentation

Creates a column called 'opium_present' if opioid death involved opium

Description

Note that ICD9 years did not include an opium code. We code it as 0 by default, but can be coded however specified in missing_val parameter. This function flags all opioid deaths that involved opium.

Usage

flag_opium_present(processed_df, year = NULL, missing_val = 0)

Arguments

processed_df

MCOD dataframe already processed

year

if NULL, will attempt to detect

missing_val

value to indicate missing (i.e., code did not exist)

Value

a new dataframe with 1 additional column


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