requireIsFirstDrugEntry | R Documentation |
Filter the cohort table keeping only the first cohort record per subject.
requireIsFirstDrugEntry(
cohort,
cohortId = NULL,
name = omopgenerics::tableName(cohort)
)
cohort |
A cohort_table object. |
cohortId |
A cohort definition id to restrict by. If NULL, all cohorts will be included. |
name |
Name of the new cohort table, it must be a length 1 character vector. |
The cohort table having applied the first entry requirement.
library(DrugUtilisation)
library(dplyr, warn.conflicts = FALSE)
cdm <- mockDrugUtilisation()
cdm$cohort1 <- cdm$cohort1 |>
requireIsFirstDrugEntry()
attrition(cdm$cohort1) |>
glimpse()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.