flag_opioid_types: Take a processed MCOD dataframe and create indicators for...

View source: R/flag_opioid_types.R

flag_opioid_typesR Documentation

Take a processed MCOD dataframe and create indicators for opioid types

Description

Creates 9 indicators for all opioid deaths. 7 for type of opioid (opium, heroin, natural, methadone, synethtic, other, unknown), 1 column for the number of opioids, and 1 column to indicate presence of more than one opioid.

Usage

flag_opioid_types(processed_df, year = NULL)

Arguments

processed_df

MCOD dataframe already processed

year

if NULL, will attempt to detect

Value

a new dataframe with 9 additional columns


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