icd9Clean: Reformat Comorbidity Measures

Description Usage Arguments Value Author(s) Examples

View source: R/cmbd.R

Description

This function processes the character matrix of ICD9 codes by converting them to character codes of length 5. For SAS procedure from HCUP, it trims all character string to be of length 5, adds the missing trailing white space, and capitalizes the first character in ICD9 codes.

Usage

1
icd9Clean(input, style = c("touch", "hcup"))

Arguments

input

a character matrix of ICD9 codes, with rows representing patients.

style

a character vector of length one indicating the reformatting style to follow. The possible option are "touch" and "hcup". The former does the cleaning for this package; The latter does the reformatting for the SAS script provided by HCUP.

Value

a matrix of cleaned ICD9 codes.

Author(s)

Jun Yan and Wenjie Wang

Examples

1
2
3
data(dxDat)
icd <- dxDat[, -1L]
output <- icd9Clean(icd)

wenjie2wang/touch documentation built on Oct. 17, 2018, 3:31 a.m.