Description Usage Arguments Details Value Examples
: Given a data.table with a column containing one or more ICD9 code ranges (separated by ";"), and another with the name of the corresponding condition, return a data.table with an expanded, comprehensive list of all valid ICD9 codes falling in the listed range(s), along with names of the condition inherited from the original table.
1 | clean_icd_list(data, code_col, name_col, decimal = TRUE, validate = FALSE)
|
data |
data.table containing a column with icd9 code ranges and code range names (data.table). |
code_col |
name of the column containing the icd9 code ranges (see the below example) - commented out rows (start with '#') are ignored (character). |
name_col |
name of the column containing the code range names (character). |
decimal |
whether or not the icd9 codes are in decimal format (logical - TRUE/FALSE) [default: TRUE]. |
validate |
whether or not to subset to 'defined' icd9 codes (see www.rdocumentation.org/packages/icd/versions/2.2/topics/icd_expand_range for more detail) (logical - TRUE/FALSE) [default: FALSE]. |
Maintained by: Clara Marquardt
data.table with the expanded icd9 code list and the associated code range names.
1 2 3 4 | orig_table <- copy(gagne_code)
print(orig_table$code)
code_table <- clean_icd_list(data=orig_table, code_col="code", name_col="condition", decimal=FALSE, validate=FALSE)
print(code_table)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.