Updates a cohort by applying a new query.

cb_set_columns(cohort, column_ids, keep_columns = TRUE)

Arguments

cohort

A cohort object. (Required) See constructor function cb_create_cohort or cb_load_cohort

column_ids

Vector of phenotype IDs to be added as columns in the participant table.

keep_columns

If True, pre-existing columns are retained and newly supplied columns are added. Otherwise, pre-exisitng columns are overwritten. (Default: TRUE)

Value

The updated cohort object.

Examples

if (FALSE) {
my_cohort <- cb_load_cohort(cohort_id = "612f37a57673ed0ddeaf1333", cb_version = "v2")

my_cohort <- cb_set_columns(my_cohort, c(1, 99, 38), keep_columns = F)
}