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

1
2
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

1
2
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")

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.