darwin-eu / omopgenerics

https://darwin-eu.github.io/omopgenerics/
Apache License 2.0
2 stars 1 forks source link

improve assertList error message #465

Closed ilovemane closed 2 months ago

ilovemane commented 2 months ago

At the moment if you give a tibble to assertList function, the error message will be non informative.

test <- omopgenerics::assertList(dplyr::tibble(cohort_definition_id = 1, 
    subject_id = c(1, 3, 4), cohort_start_date = as.Date("2020-01-01"), 
    cohort_end_date = as.Date("2020-01-01")))
#> Error in `vec_c()`:
#> ! Can't combine `cohort_definition_id` <double> and `cohort_start_date` <date>.