gather_enroll_data_parallel: Get enrollment data over multiple "enrollees" tables (in...

gather_enroll_data_parallelR Documentation

Get enrollment data over multiple "enrollees" tables (in parallel)

Description

Get enrollment data over multiple "enrollees" tables (in parallel)

Usage

gather_enroll_data_parallel(
  collect_tab = collect_table(),
  enrolid_list,
  collect_n = Inf,
  vars = c("dobyr", "sex"),
  db_path,
  num_cores = NULL
)

Arguments

collect_tab

A tibble with the specific setting (i.e. inpatient or outpatient), source (i.e. ccae or mdcr), and year to access Default is all possible combinations of setting, source, and year

enrolid_list

A list of enrolids for which enrollment data will be collected

collect_n

The number of observations to return

vars

Vector of specific variables of interest in the "enrollees" tables (e.g. c("dobyr", "sex"))

db_path

Path to the database

num_cores

The number of worker cores to use. If not specified will determined the number of cores based on the which ever is the smallest value between number of rows in for collect_tab or detected number of cores - 1

Value

A tibble with information on each enrolid in enrolid_list. The number of columns in the tibble depends on the number of vars selected

Examples


out <- gather_enroll_data_parallel(enrolid_list = final_cohort$enrolid, db_path = db_path, vars = c("dobyr", "sex"))


aarmiller/smallDB documentation built on March 29, 2024, 9:37 a.m.