get_data: Get (micro)data from APDE storage.

View source: R/get_data.R

get_dataR Documentation

Get (micro)data from APDE storage.

Description

Simple front-end for pulling in standard APDE data

Usage

get_data(dataset, cols = NULL, year = 2021, ...)

Arguments

dataset

Character vector of length 1. Identifies the dataset to be fetched. Use list_apde_data for available options

cols

Character vector of length >=1. Identifies which columns should be returned. NULL returns all columns in the analytic dataset. See list_dataset_columns for more information on which columns are considered default by dataset.

year

Numeric vector. Identifies which year(s) of data should be pulled

...

Additional named arguments based on the specific dataset. To see what these options should be, do help(get_data_`dataset`)

Value

Typically a data.table (adminstrative data) or dtsurvey object (survey data) for further analysis. When requesting HRA or Region data from the BRFSS dataset, it will return an imputationList comprised of survey-weighted dtsurvey objects.

References

https://github.com/PHSKC-APDE/rads/wiki/get_data

Examples


 test <- get_data(
          dataset = 'death',
          cols = c('chi_year', 'chi_sex'),
          year = c(2021))

 head(test)


PHSKC-APDE/rads documentation built on April 14, 2025, 10:47 a.m.