R Observatory
Search

icd

4.0.9CRAN

Comorbidity Calculations and Tools for ICD-9 and ICD-10 Codes

Archived on 6 Oct 2020

CRAN's reason
check problems were not corrected in timeChecks not fixed
Last release
4.0.9, 31 May 2020
CRAN archived it once before, and it came back that time. History
4.0.9 from CRAN’s archive
# Needs the pak package. # install.packages("pak") # Built from source, so it needs build tools. pak::pak("cran::icd@4.0.9")

Calculate comorbidities, medical risk scores, and work very quickly and precisely with ICD-9 and ICD-10 codes. This package enables a work flow from raw tables of ICD codes in hospital databases to comorbidities.

Full description

Calculate comorbidities, medical risk scores, and work very quickly and precisely with ICD-9 and ICD-10 codes. This package enables a work flow from raw tables of ICD codes in hospital databases to comorbidities. ICD-9 and ICD-10 comorbidity mappings from Quan (Deyo and Elixhauser versions), Elixhauser and AHRQ included. Common ambiguities and code formats are handled. Comorbidity computation includes Hierarchical Condition Codes, and an implementation of AHRQ Clinical Classifications. Risk scores include those of Charlson and van Walraven. US Clinical Modification, Word Health Organization, Belgian and French ICD-10 codes are supported, most of which are downloaded on demand.

Maintainer
Jack O. Wasey
Licence
GPL-3
Latest release
31 May 2020
First release
11 Apr 2016

Compare with another package

More details
Releases
13
Needs R
>= 3.4
Language
en-US
LazyData
true
RoxygenNote
7.1.0
Cite

Package

Run in R for the authors' preferred citation:

citation("icd")
APA
Wasey, J. O., Murphy, W., Odisho, A., Druker, V., Lee, E., McCormick, P., Gasparini, A., Lang, M., & R Core Team. (n.d.). icd: Comorbidity Calculations and Tools for ICD-9 and ICD-10 Codes (Version 4.0.9) [Computer software]. Retrieved October 28, 2026, from https://CRAN.R-project.org/package=icd
About

This package has no citation file, so citation() returns this entry built from DESCRIPTION.

R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA
Balamuta, J. J. (2026). R Observatory: Metrics for icd version 4.0.9 [Data set]. HJJB, LLC. Data release v2026-10-27. https://doi.org/10.5281/zenodo.21843040
About

From data release v2026-10-27, which the citation names so these numbers can be found later.

CRAN checks only the packages on CRAN, and it archived this one on 6 Oct 2020.

All time

Total downloads over all time
38,836It comes from CRAN alone.

CRAN

38,836 downloads over all time

Since
12 Apr 2016

It is in the total. Take it out

Over time

Compare downloads

Needs
3
Dependent packages
0
Suggested by
1
Needs (3)
Optional extras (14)
Functions
823
Public exports
169
Lines of R code
15,900
Median complexity
1
Functions (823)
Size and composition

Lines by kind (36,935)

KindLinesShare
R code15,90043%
Tests10,07927%
Documentation5,45415%
Guides2,0686%
Compiled code3,4349%

Lines by language

LanguageLinesShare
R25,95870%
Rd5,45415%
C++2,9128%
Vignettes1,1583%
Other9313%
C5221%

Languages are counted from file extensions.

Files
395
R functions
672
Compiled functions
152
Object systems
S3: 140 methods
Complexity
Median
1
Mean
2.26
Highest
19
Median lines per function
8
About complexity

Cyclomatic complexity counts the independent paths through a function: 1 is a straight line, higher is harder to test. R functions only.

Call graph figures
R functions
672
Calls
1,140
Unconnected
106
Groups
15
Growth (13 releases)
Total lines by release
32,774 on 11 Apr 201636,935 on 31 May 2020
Release changes

No coverage run is on record for this package.

Test cases
511
Lines of tests
10,079
Exports named in tests
68%
Has tests
Yes
Test frameworks
testthat, tinytest
Test lines per line of code
0.63
Exports documented
97%
Arguments documented
92.9%
Return value documented
16.7%
Help pages with examples
34.9%
Examples run in checks
86.8%
Other documentation
README
Yes, 1,358 words
Release notes file
Yes
Help pages
109
Lines of documentation
5,454

43 datasets, 34 can be loaded by name

DatasetSizeColumns
chapters
icd10_map_ahrqAHRQ comorbiditieslength 30
icd10_map_ahrq_pcsAHRQ ICD-10-PCS categorieslength 4
icd10_map_ccMedicare Hierarchical Condition Categories37,416 × 3icd_code, cc, year
icd10_map_ccsClinical Classifications Software (CCS) for ICD9/10-CMlength 3
icd10_map_charlsonQuan adaptation of Deyo/Charlson comorbiditieslength 17
icd10_map_elixElixhauser comorbiditieslength 31
icd10_map_pccc_dxPediatric Complex Chronic Conditionslength 12
icd10_map_pccc_pcsPediatric Complex Chronic Conditionslength 12
icd10_map_quan_deyoQuan adaptation of Deyo/Charlson comorbiditieslength 17
icd10_map_quan_elixQuan adaptation of Elixhauser comorbiditieslength 31
icd10_names_ccsComorbidity nameslength 3
More datasets (31)
DatasetSizeColumns
icd10_sub_chaptersICD-10 sub-chapterslength 283
icd10cm2019United States and Belgium ICD-10-CM94,444 × 8code, billable, short_desc, long_desc, three_digit, major and 2 more
icd9_majorsICD-9 chaptersalso in 1 other packagelength 1,234
icd9_map_ahrqAHRQ comorbiditieslength 30
icd9_map_ccMedicare Hierarchical Condition Categories30,335 × 3icd_code, cc, year
icd9_map_charlsonQuan adaptation of Deyo/Charlson comorbiditieslength 17
icd9_map_elixElixhauser comorbiditieslength 31
icd9_map_multi_ccsClinical Classifications Software (CCS) for ICD9/10-CMlength 4
icd9_map_pccc_dxPediatric Complex Chronic Conditionslength 12
icd9_map_pccc_pcsPediatric Complex Chronic Conditionslength 12
icd9_map_quan_deyoQuan adaptation of Deyo/Charlson comorbiditieslength 17
icd9_map_quan_elixQuan adaptation of Elixhauser comorbiditieslength 31
icd9_map_single_ccsClinical Classifications Software (CCS) for ICD9/10-CMlength 284
icd9_names_multi_ccsComorbidity nameslength 4
icd9_names_single_ccsComorbidity nameslength 284
icd9_sub_chaptersICD-9 sub-chapters
icd9cm2014_leafThe final ICD-9-CM list of leaf ('billable') codes14,567 × 3code, short_desc, long_desc
icd9cm_hierarchyICD-9-CM diagnosis codes including leaf nodes and branch names up to the three-digit codes.17,561 × 8code, billable, short_desc, long_desc, three_digit, major and 2 more
icd_map_cc_hccMedicare Hierarchical Condition Categories365 × 8year, ifcc, V1, V2, V3, V4 and 2 more
mappingNames
uranium_pathologyUnited States Transuranium & Uranium Registriesalso in 1 other package2,376 × 2case, icd10
vermont_dxHospital discharge data from Vermontalso in 2 other packages1,000 × 25visit_id, age_group, sex, death, DRG, DX1 and 19 more
icd9_short_elength 2
icd9_short_e_definedlength 2
icd9_short_e_leaflength 2
icd9_short_nlength 2
icd9_short_n_definedlength 2
icd9_short_n_leaflength 2
icd9_short_vlength 2
icd9_short_v_definedlength 2
icd9_short_v_leaflength 2
Earlier names (1)
  • Kevin Ushey

No repository on record

R releases
  • On CRAN
  • Archived
  • Release
2.02.23.0.03.34.0.9ArchivedArchived and backArchived twice and back onceArchived twice and back once

Archived and back

ArchivedBackCRAN's reasonKind
6 Oct 2020not backcheck problems were not corrected in timeChecks not fixed
11 Apr 202031 May 2020check problems were not corrected despite remindersChecks not fixed
VersionReleasedREvents
4.0.931 May 20204.0.0Back on CRAN 31 May 2020
Archived 6 Oct 2020
“check problems were not corrected in time”
4.0.67 May 20193.6.0Archived 11 Apr 2020
“check problems were not corrected despite reminders”
3.318 Nov 20183.5.0
3.2.118 Aug 20183.5.0
3.2.07 Jun 20183.5.0
3.1.29 May 20183.5.0
3.0.02 May 20183.5.0
2.4.110 Mar 20183.4.3
Earlier versions (5)
VersionReleasedR
2.3.112 Oct 20173.4.2
2.214 May 20173.4.0
2.12 Sep 20163.3.1
2.0.115 Apr 20163.2.5
2.011 Apr 20163.2.4
Release notes (4.0.9)
  • happy to add Alessandro Gasparini as collaborator, as we move comorbidity API from icd to the comorbidity package in subsequent releases, and separate out the fast comorbidity calculation engine into a new, tighter package. icd will continue to provide icd conversion, validation, translation, mapping, etc., and keep backward compatibility for a year during this migration.
  • also adding the tireless @patrickmd as a contributor, with his significant pull requests, testing and patience.
  • likewise for
  • fixed CRAN submission broken links
  • Updated French ICD code URL
  • dropped r-lib/rappdirs in favor of copy of backports::R_app_dirs
  • dropped extraneous files from source tarball sent to CRAN
  • clean-up prebuilt pdf paths, both keeping package smaller, and fixing broken links, as noted by CRAN but missed by R CMD check somehow.
  • anticipate next version including work from the NIH hackathon for general equivalence mapping of ICD-9-CM to ICD-10-CM codes, thanks to those women, and also the contributions from @dapritchard @dprtichlibre