flag_other_natural_present: Creates a column 'other_natural_present' if opioid death...

View source: R/flag_other_natural_present.R

flag_other_natural_presentR Documentation

Creates a column 'other_natural_present' if opioid death involved opium

Description

Note that ICD9 years did not include an other_natural 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 other natural/semi-synthetic opioids.

Usage

flag_other_natural_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.