Description Usage Arguments Value Examples
View source: R/add_intent_mech_icd9cm.R
, reference
1 2 | add_intent_mech_icd9cm(data, inj_col, reference = c("both", "intent",
"mechanism"))
|
data |
input data |
inj_col |
ecode and diagnosis column indices |
reference |
injury ice reference with three possible choices: "both"(the default) adding intent and mechanism combined variables "intent" adding intent only "mechanism" adding mechanism only |
return the input with additional variables (intent_mechanism combinations, intent variables, or mechanism variables depending on the reference choice
1 2 3 4 5 6 7 | library(tidyverse)
dat <- data.frame(e1 = c("E9585", "E9885", "E986", "E966"),
e2 = c("E9050", "E9583", "E846", "E9556" ))
dat %>% create_intent_mech(inj_col = c(1,2), reference = "both")
dat %>% create_intent_mech(inj_col = c(1,2), reference = "intent")
dat %>% create_intent_mech(inj_col = c(1,2), reference = "mechanism")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.