list_dataset_columns_sql: Column Type Handler for SQL-based datasets

list_dataset_columns_sqlR Documentation

Column Type Handler for SQL-based datasets

Description

Internal function that processes column names for SQL-based data (birth, death, chars). Adds any 'bonus' variables that will be created by the get_data functions. Use by list_dataset_columns.

Usage

list_dataset_columns_sql(config, year, mykey, kingco, analytic_only)

Arguments

config

List of configuration settings for the dataset that are defined by list_dataset_columns_config

year

Year(s) of dataset to check. Only applies to BRFSS, HYS, and PUMS data. For PUMS data, this is limited to a single year (e.g., 2023) or a continuous 5-year period (e.g., 2018:2022). Defaults to year = 2021.

mykey

Character vector of length 1 OR a database connection. Identifies the keyring:: key that can be used to access the Health & Human Services Analytic Workspace (HHSAW). Defaults to mykey = 'hhsaw'.

kingco

Logical. Toggle for King County (TRUE) or WA State (FALSE) column names. Only applys to BRFSS data. Defaults to kingco = TRUE.

analytic_only

Logical. Controls whether columns outside the analytic dataset should be returned. Only applies to HYS data. Defaults to analytic_only = FALSE.

Value

data.table with var.names column


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