library(omock)
#> Warning: package 'omock' was built under R version 4.4.1
library(CohortConstructor)
cdm <- mockCdmReference() |>
mockPerson(nPerson = 100) |>
mockObservationPeriod() |>
mockCohort(
name = "cohort",
numberCohorts = 1
)
cdm$cohort <- cdm$cohort |>
requireAge(c(0, Inf))
#> Warning: There was 1 warning in `dplyr::mutate()`.
#> ℹ In argument: `max_age = as.integer(sub(".*_", "", .data$age_range))`.
#> Caused by warning:
#> ! NAs introduced by coercion to integer range
#> Error in `dplyr::mutate()`:
#> ℹ In argument: `age = as.integer(...)`.
#> Caused by error in `CDMConnector::dbms()`:
#> ! Assertion on 'con' failed: Must inherit from class 'DBIConnection', but has class 'NULL'.
Created on 2024-10-17 with reprex v2.1.0