Last data update: 2014.03.03
|
R: Convert ICD-9-CM code list to dataframe
melt_icd9list | R Documentation |
Convert ICD-9-CM code list to dataframe
Description
melt_icd9list uses ddply to melt a column of comma-separated ICD-9-CM
codes into a series of rows, one for each code.
Usage
melt_icd9list(df, idvar = "id", icd9var = "icd9cm", .progress = "none",
.parallel = FALSE, .paropts = NULL)
Arguments
df |
a data frame with at least two columns, specified as idvar
and icd9var .
|
idvar |
string with name of ID variable within df (defaults to "id")
|
icd9var |
string with name of ICD code variable within df (defaults to "icd9cm")
|
.progress |
passed to ddply
|
.parallel |
passed to ddply
|
.paropts |
passed to ddply
|
Value
a dataframe with two columns, idvar and "icd9cm"
Examples
cases <- data.frame(id=c(1,2), icd9list=c('162.4,070.30,155.0,401.9','996.52,E878.8,V45.86'))
melt_icd9list(cases, "id", "icd9list")
Results
|