nhds2010: National Hospital Discharge Survey 2010 data

Description Source Examples

Description

The United States National Hospital Discharge Survey (NHDS) 2010 data is public domain data from the US [Center for Disease Control](https://www.cdc.gov). This is de-identified patient data with summary information about each patient at the end of a hospital admission, including demographic information, admission diagnoses, comorbidities and procedure codes, death or disposition. There are no identifiers in the data, so a simple count was included.

Source

https://www.cdc.gov/nchs/nhds/index.htm

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
if (require("icd", versionCheck(version = "3.4", op = ">="))) {
head(nhds2010)
colSums(icd::comorbid_ahrq(nhds2010))
nhds2010$hypertension <- icd::comorbid_ahrq(nhds2010)[, "HTN"]
nhds2010$charlson <- icd::charlson(nhds2010)
hist(nhds2010[nhds2010$age_unit == "years", "age"],
     main = "Histogram of age when specified in years",
     xlab = "Age in years"
)
boxplot(age ~ hypertension,
        data = nhds2010,
        outline = FALSE,
        ylab = "Age")
boxplot(charlson ~ adm_type,
        data = nhds2010,
        las = 2,
        varwidth = TRUE,
        outline = FALSE,
        ylab = "Charlson Score"
)
}

Example output

Loading required package: icd
Failed with error:could not find function "versionCheck"

nhds documentation built on May 1, 2019, 10:30 p.m.