View source: R/cb_filter_apply.R
cb_apply_query | R Documentation |
Updates a cohort by applying a new query.
cb_apply_query(cohort, query, keep_query = TRUE)
cohort |
A cohort object. (Required)
See constructor function |
query |
A phenotype query defined using the |
keep_query |
If True, combines the newly supplied query with the pre-existing query. Otherwise, pre-existing query is overwritten. (Default: TRUE) |
The updated cohort object.
## Not run:
A <- phenotype(id = 13, from = "2016-01-21", to = "2017-02-13")
B <- phenotype(id = 4, value = "Cancer")
A_not_B <- A & !B
my_cohort <- cb_load_cohort(cohort_id = "612f37a57673ed0ddeaf1333", cb_version = "v2")
my_cohort <- cb_apply_query(my_cohort, query = A_not_B, keep_query = F)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.