View source: R/requireMinCohortCount.R
requireMinCohortCount | R Documentation |
requireMinCohortCount()
filters an existing cohort table, keeping only
records from cohorts with a minimum number of individuals
requireMinCohortCount(
cohort,
minCohortCount,
cohortId = NULL,
updateSettings = FALSE,
name = tableName(cohort)
)
cohort |
A cohort table in a cdm reference. |
minCohortCount |
The minimum count of sbjects for a cohort to be included. |
cohortId |
Vector identifying which cohorts to modify (cohort_definition_id or cohort_name). If NULL, all cohorts will be used; otherwise, only the specified cohorts will be modified, and the rest will remain unchanged. |
updateSettings |
If TRUE, dropped cohorts will also be removed from all cohort table attributes (i.e., settings, attrition, counts, and codelist). If FALSE, these attributes will be retained but updated to reflect that the affected cohorts have been suppressed. |
name |
Name of the new cohort table created in the cdm object. |
Cohort table
library(CohortConstructor)
cdm <- mockCohortConstructor(nPerson = 100)
cdm$cohort1 |>
requireMinCohortCount(5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.