get_data_hys: Get HYS microdata from storage.

View source: R/get_data.R

get_data_hysR Documentation

Get HYS microdata from storage.

Description

Get HYS microdata from storage.

Usage

get_data_hys(
  cols = NULL,
  year = c(2021),
  weight_variable = "wt_grade_kc",
  kingco = TRUE,
  version = "best",
  ar = TRUE
)

Arguments

cols

Character vector of length >-1. Identifies which columns should be returned. NULL or NA 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 years of data should be pulled

weight_variable

Character vector of length 1. Identifies which weight column

kingco

logical. Return dataset for analyses in King County only. The only option

version

version of the HYS dataset to pull. Defaults to best. Don't change unless you know what you are doing.

ar

logical. Whether to pull from the analytic ready dataset. FALSE will load stage data

Value

dataset either in data.table (administrative data) or svy_tbl (survey data) for further analysis/tabulation

Examples



 get_data_hys(cols = NULL, year = c(2016, 2018), weight_variable = 'wt_grade_kc')


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