icd_create_indicator: Create a new indicator based on pattern in the argument expr

Description Usage Arguments Value Examples

Description

Create a new indicator based on pattern in the argument expr

Usage

1
icd_create_indicator(data, new_name, expr, colvec, ignore.case = T, perl = T)

Arguments

data

input data

new_name

proposed name for the indicator

expr

regular expression describing the pattern of interest

colvec

indices or names of variables (where are the pattern) without quotes

ignore.case

logical

perl

logical

Value

new indicator matching the pattern described in the regular expression

Examples

1
2
3
4
5
library(dplyr)
library(useicd10cm)
icd10cm_data150 %>%
  icd_create_indicator(new_name = "hero", expr = "T401.[1-4]", colvec = c(2:6))) %>%
  count(hero)

epinotes/useicd10cm documentation built on Oct. 18, 2021, 2:33 a.m.