matrix_intent_mechanism: Add Selected Intents mechanisms combined

View source: R/matrix_intent_mechanism.R

matrix_intent_mechanismR Documentation

Add Selected Intents mechanisms combined

Description

Add Selected Intents mechanisms combined

Usage

matrix_intent_mechanism(data, inj_col, ...)

Arguments

data

input data

inj_col

ecode and diagnosis column indices

...

keyword list

Value

return the input with additional combined intent and mechanism variables

See Also

matrix_matched_intent_mechanism for a more efficient approach

dat

Examples

library(dplyr)
library(purrr)
dat <- data.frame(
  d1 = c("T63023", "X92821", "X99100", "T360x"),
  d2 = c("T65823", "Y030x0", "T17200", "V0100x")
)
dat %>% matrix_intent_mechanism(inj_col = c(1, 2), "fall") # by default all intents and mechanisms


epinotes/injurymatrix documentation built on July 28, 2022, 12:34 a.m.