get_data_chars | R Documentation |
Get CHARS (Comprehensive Hospital Abstract Reporting System) microdata from storage.
get_data_chars(
cols = NA,
year = NA,
kingco = T,
version = "final",
wastate = T,
inpatient = T,
deaths = T,
topcode = T,
mykey = "hhsaw"
)
cols |
Character vector of length >=1. Identifies which columns should be returned. NA returns all columns in the analytic dataset.
See Default = NA |
year |
Numeric vector. Identifies which years of data should be pulled. Defaults to the most recent year. Default = most recent year only |
kingco |
logical OR 'zip'. When When Default = T |
version |
Character vector of length 1. Either 'final' or 'stage'. Default = 'final' |
wastate |
logical. Return dataset for Washington State CHARS data only. When FALSE includes Oregon. Default = T |
inpatient |
logical. Return dataset for inpatients only. When FALSE includes observation patients. Default = T |
deaths |
logical. Return dataset with or without patients who died in the hospital. When TRUE the dataset includes those who died. Default = T |
topcode |
logical. Do you want to top code chi_age at 100 to match population data? Default = T |
mykey |
Character vector of length 1. Identifies the keyring:: 'service' name that can be used to access the Health & Human Services Analytic Workspace (HHSAW). Default == 'hhsaw' |
a single data.table
test <- get_data_chars(
cols = c('seq_no', 'chi_age'),
year = c(2020),
kingco = TRUE,
wastate = TRUE,
version = 'final',
inpatient = TRUE,
deaths = FALSE,
topcode = FALSE,
mykey = 'hhsaw')
head(test)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.