Learn R Programming

nhds (version 1.0.3)

nhds2010: National Hospital Discharge Survey 2010 data

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.

Arguments

Examples

Run this code
# NOT RUN {
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"
)
}
# }

Run the code above in your browser using DataLab