Running 'spelling.R' [0s]
  Running 'testthat.R' [125s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > # This file is part of the standard setup for testthat.
  > # It is recommended that you do not modify it.
  > #
  > # Where should you do additional test configuration?
  > # Learn more about the roles of various files in:
  > # * https://r-pkgs.org/tests.html
  > # * https://testthat.r-lib.org/reference/test_package.html#special-files
  > 
  > library(testthat)
  > library(PatientProfiles)
  > 
  > test_check("PatientProfiles")
  Starting 2 test processes
  [ FAIL 81 | WARN 16 | SKIP 0 | PASS 91 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-addAttributes.R:2:3'): addAttributes, functionality ────────────
  <vctrs_error_cast/vctrs_error_incompatible_type/vctrs_error_incompatible/vctrs_error/rlang_error/error/condition>
  Error in `as.character(cohort_ref[[2]]$x)`: Can't convert `x` <dbplyr_table_ident> to <character>.
  Backtrace:
       ▆
    1. ├─PatientProfiles::mockPatientProfiles(connectionDetails) at test-addAttributes.R:2:2
    2. │ └─CDMConnector::cdm_from_con(...)
    3. │   └─CDMConnector::new_generated_cohort_set(...)
    4. │     ├─... %>% stringr::str_remove_all("[^A-Za-z0-9_]")
    5. │     ├─base::rev(...)
    6. │     ├─stringr::str_split(as.character(cohort_ref[[2]]$x), "\\.")
    7. │     │ └─stringr:::check_lengths(string, pattern)
    8. │     │   └─vctrs::vec_size_common(...)
    9. │     ├─base::as.character(cohort_ref[[2]]$x)
   10. │     └─vctrs:::as.character.vctrs_vctr(cohort_ref[[2]]$x)
   11. │       └─vctrs::vec_cast(x, character())
   12. ├─stringr::str_remove_all(., "[^A-Za-z0-9_]")
   13. │ └─stringr::str_replace_all(string, pattern, "")
   14. │   └─stringr:::check_lengths(string, pattern, replacement)
   15. │     └─vctrs::vec_size_common(...)
   16. └─vctrs (local) `<fn>`()
   17.   └─vctrs::vec_default_cast(...)
   18.     ├─base::withRestarts(...)
   19.     │ └─base (local) withOneRestart(expr, restarts[[1L]])
   20.     │   └─base (local) doWithOneRestart(return(expr), restart)
   21.     └─vctrs::stop_incompatible_cast(...)
   22.       └─vctrs::stop_incompatible_type(...)
   23.         └─vctrs:::stop_incompatible(...)
   24.           └─vctrs:::stop_vctrs(...)
   25.             └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = call)
  ── Error ('test-addCategories.R:2:3'): addCategories, functionality ────────────
  <vctrs_error_cast/vctrs_error_incompatible_type/vctrs_error_incompatible/vctrs_error/rlang_error/error/condition>
  Error in `as.character(cohort_ref[[2]]$x)`: Can't convert `x` <dbplyr_table_ident> to <character>.
  Backtrace:
       ▆
    1. ├─PatientProfiles::mockPatientProfiles(...) at test-addCategories.R:2:2
    2. │ └─CDMConnector::cdm_from_con(...)
    3. │   └─CDMConnector::new_generated_cohort_set(...)
    4. │     ├─... %>% stringr::str_remove_all("[^A-Za-z0-9_]")
    5. │     ├─base::rev(...)
    6. │     ├─stringr::str_split(as.character(cohort_ref[[2]]$x), "\\.")
    7. │     │ └─stringr:::check_lengths(string, pattern)
    8. │     │   └─vctrs::vec_size_common(...)
    9. │     ├─base::as.character(cohort_ref[[2]]$x)
   10. │     └─vctrs:::as.character.vctrs_vctr(cohort_ref[[2]]$x)
   11. │       └─vctrs::vec_cast(x, character())
   12. ├─stringr::str_remove_all(., "[^A-Za-z0-9_]")
   13. │ └─stringr::str_replace_all(string, pattern, "")
   14. │   └─stringr:::check_lengths(string, pattern, replacement)
   15. │     └─vctrs::vec_size_common(...)
   16. └─vctrs (local) `<fn>`()
   17.   └─vctrs::vec_default_cast(...)
   18.     ├─base::withRestarts(...)
   19.     │ └─base (local) withOneRestart(expr, restarts[[1L]])
   20.     │   └─base (local) doWithOneRestart(return(expr), restart)
   21.     └─vctrs::stop_incompatible_cast(...)
   22.       └─vctrs::stop_incompatible_type(...)
   23.         └─vctrs:::stop_incompatible(...)
   24.           └─vctrs:::stop_vctrs(...)
   25.             └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = call)
  ── Error ('test-addCohortIntersect.R:6:3'): output format - one outcome cohort ──
  <vctrs_error_cast/vctrs_error_incompatible_type/vctrs_error_incompatible/vctrs_error/rlang_error/error/condition>
  Error in `as.character(cohort_ref[[2]]$x)`: Can't convert `x` <dbplyr_table_ident> to <character>.
  Backtrace:
       ▆
    1. ├─PatientProfiles::mockPatientProfiles(connectionDetails) at test-addCohortIntersect.R:6:2
    2. │ └─CDMConnector::cdm_from_con(...)
    3. │   └─CDMConnector::new_generated_cohort_set(...)
    4. │     ├─... %>% stringr::str_remove_all("[^A-Za-z0-9_]")
    5. │     ├─base::rev(...)
    6. │     ├─stringr::str_split(as.character(cohort_ref[[2]]$x), "\\.")
    7. │     │ └─stringr:::check_lengths(string, pattern)
    8. │     │   └─vctrs::vec_size_common(...)
    9. │     ├─base::as.character(cohort_ref[[2]]$x)
   10. │     └─vctrs:::as.character.vctrs_vctr(cohort_ref[[2]]$x)
   11. │       └─vctrs::vec_cast(x, character())
   12. ├─stringr::str_remove_all(., "[^A-Za-z0-9_]")
   13. │ └─stringr::str_replace_all(string, pattern, "")
   14. │   └─stringr:::check_lengths(string, pattern, replacement)
   15. │     └─vctrs::vec_size_common(...)
   16. └─vctrs (local) `<fn>`()
   17.   └─vctrs::vec_default_cast(...)
   18.     ├─base::withRestarts(...)
   19.     │ └─base (local) withOneRestart(expr, restarts[[1L]])
   20.     │   └─base (local) doWithOneRestart(return(expr), restart)
   21.     └─vctrs::stop_incompatible_cast(...)
   22.       └─vctrs::stop_incompatible_type(...)
   23.         └─vctrs:::stop_incompatible(...)
   24.           └─vctrs:::stop_vctrs(...)
   25.             └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = call)
  ── Error ('test-addCohortIntersect.R:99:3'): first vs last event - cohort table ──
  <vctrs_error_cast/vctrs_error_incompatible_type/vctrs_error_incompatible/vctrs_error/rlang_error/error/condition>
  Error in `as.character(cohort_ref[[2]]$x)`: Can't convert `x` <dbplyr_table_ident> to <character>.
  Backtrace:
       ▆
    1. ├─PatientProfiles::mockPatientProfiles(...) at test-addCohortIntersect.R:99:2
    2. │ └─CDMConnector::cdm_from_con(...)
    3. │   └─CDMConnector::new_generated_cohort_set(...)
    4. │     ├─... %>% stringr::str_remove_all("[^A-Za-z0-9_]")
    5. │     ├─base::rev(...)
    6. │     ├─stringr::str_split(as.character(cohort_ref[[2]]$x), "\\.")
    7. │     │ └─stringr:::check_lengths(string, pattern)
    8. │     │   └─vctrs::vec_size_common(...)
    9. │     ├─base::as.character(cohort_ref[[2]]$x)
   10. │     └─vctrs:::as.character.vctrs_vctr(cohort_ref[[2]]$x)
   11. │       └─vctrs::vec_cast(x, character())
   12. ├─stringr::str_remove_all(., "[^A-Za-z0-9_]")
   13. │ └─stringr::str_replace_all(string, pattern, "")
   14. │   └─stringr:::check_lengths(string, pattern, replacement)
   15. │     └─vctrs::vec_size_common(...)
   16. └─vctrs (local) `<fn>`()
   17.   └─vctrs::vec_default_cast(...)
   18.     ├─base::withRestarts(...)
   19.     │ └─base (local) withOneRestart(expr, restarts[[1L]])
   20.     │   └─base (local) doWithOneRestart(return(expr), restart)
   21.     └─vctrs::stop_incompatible_cast(...)
   22.       └─vctrs::stop_incompatible_type(...)
   23.         └─vctrs:::stop_incompatible(...)
   24.           └─vctrs:::stop_vctrs(...)
   25.             └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = call)
  ── Error ('test-addCohortIntersect.R:219:3'): multiple cohort entries per person ──
  <vctrs_error_cast/vctrs_error_incompatible_type/vctrs_error_incompatible/vctrs_error/rlang_error/error/condition>
  Error in `as.character(cohort_ref[[2]]$x)`: Can't convert `x` <dbplyr_table_ident> to <character>.
  Backtrace:
       ▆
    1. ├─PatientProfiles::mockPatientProfiles(...) at test-addCohortIntersect.R:219:2
    2. │ └─CDMConnector::cdm_from_con(...)
    3. │   └─CDMConnector::new_generated_cohort_set(...)
    4. │     ├─... %>% stringr::str_remove_all("[^A-Za-z0-9_]")
    5. │     ├─base::rev(...)
    6. │     ├─stringr::str_split(as.character(cohort_ref[[2]]$x), "\\.")
    7. │     │ └─stringr:::check_lengths(string, pattern)
    8. │     │   └─vctrs::vec_size_common(...)
    9. │     ├─base::as.character(cohort_ref[[2]]$x)
   10. │     └─vctrs:::as.character.vctrs_vctr(cohort_ref[[2]]$x)
   11. │       └─vctrs::vec_cast(x, character())
   12. ├─stringr::str_remove_all(., "[^A-Za-z0-9_]")
   13. │ └─stringr::str_replace_all(string, pattern, "")
   14. │   └─stringr:::check_lengths(string, pattern, replacement)
   15. │     └─vctrs::vec_size_common(...)
   16. └─vctrs (local) `<fn>`()
   17.   └─vctrs::vec_default_cast(...)
   18.     ├─base::withRestarts(...)
   19.     │ └─base (local) withOneRestart(expr, restarts[[1L]])
   20.     │   └─base (local) doWithOneRestart(return(expr), restart)
   21.     └─vctrs::stop_incompatible_cast(...)
   22.       └─vctrs::stop_incompatible_type(...)
   23.         └─vctrs:::stop_incompatible(...)
   24.           └─vctrs:::stop_vctrs(...)
   25.             └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = call)
  ── Error ('test-addCohortIntersect.R:282:3'): output names ─────────────────────
  <vctrs_error_cast/vctrs_error_incompatible_type/vctrs_error_incompatible/vctrs_error/rlang_error/error/condition>
  Error in `as.character(cohort_ref[[2]]$x)`: Can't convert `x` <dbplyr_table_ident> to <character>.
  Backtrace:
       ▆
    1. ├─PatientProfiles::mockPatientProfiles(connectionDetails) at test-addCohortIntersect.R:282:2
    2. │ └─CDMConnector::cdm_from_con(...)
    3. │   └─CDMConnector::new_generated_cohort_set(...)
    4. │     ├─... %>% stringr::str_remove_all("[^A-Za-z0-9_]")
    5. │     ├─base::rev(...)
    6. │     ├─stringr::str_split(as.character(cohort_ref[[2]]$x), "\\.")
    7. │     │ └─stringr:::check_lengths(string, pattern)
    8. │     │   └─vctrs::vec_size_common(...)
    9. │     ├─base::as.character(cohort_ref[[2]]$x)
   10. │     └─vctrs:::as.character.vctrs_vctr(cohort_ref[[2]]$x)
   11. │       └─vctrs::vec_cast(x, character())
   12. ├─stringr::str_remove_all(., "[^A-Za-z0-9_]")
   13. │ └─stringr::str_replace_all(string, pattern, "")
   14. │   └─stringr:::check_lengths(string, pattern, replacement)
   15. │     └─vctrs::vec_size_common(...)
   16. └─vctrs (local) `<fn>`()
   17.   └─vctrs::vec_default_cast(...)
   18.     ├─base::withRestarts(...)
   19.     │ └─base (local) withOneRestart(expr, restarts[[1L]])
   20.     │   └─base (local) doWithOneRestart(return(expr), restart)
   21.     └─vctrs::stop_incompatible_cast(...)
   22.       └─vctrs::stop_incompatible_type(...)
   23.         └─vctrs:::stop_incompatible(...)
   24.           └─vctrs:::stop_vctrs(...)
   25.             └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = call)
  ── Error ('test-addCohortIntersect.R:357:3'): expected errors  ─────────────────
  <vctrs_error_cast/vctrs_error_incompatible_type/vctrs_error_incompatible/vctrs_error/rlang_error/error/condition>
  Error in `as.character(cohort_ref[[2]]$x)`: Can't convert `x` <dbplyr_table_ident> to <character>.
  Backtrace:
       ▆
    1. ├─PatientProfiles::mockPatientProfiles(connectionDetails) at test-addCohortIntersect.R:357:2
    2. │ └─CDMConnector::cdm_from_con(...)
    3. │   └─CDMConnector::new_generated_cohort_set(...)
    4. │     ├─... %>% stringr::str_remove_all("[^A-Za-z0-9_]")
    5. │     ├─base::rev(...)
    6. │     ├─stringr::str_split(as.character(cohort_ref[[2]]$x), "\\.")
    7. │     │ └─stringr:::check_lengths(string, pattern)
    8. │     │   └─vctrs::vec_size_common(...)
    9. │     ├─base::as.character(cohort_ref[[2]]$x)
   10. │     └─vctrs:::as.character.vctrs_vctr(cohort_ref[[2]]$x)
   11. │       └─vctrs::vec_cast(x, character())
   12. ├─stringr::str_remove_all(., "[^A-Za-z0-9_]")
   13. │ └─stringr::str_replace_all(string, pattern, "")
   14. │   └─stringr:::check_lengths(string, pattern, replacement)
   15. │     └─vctrs::vec_size_common(...)
   16. └─vctrs (local) `<fn>`()
   17.   └─vctrs::vec_default_cast(...)
   18.     ├─base::withRestarts(...)
   19.     │ └─base (local) withOneRestart(expr, restarts[[1L]])
   20.     │   └─base (local) doWithOneRestart(return(expr), restart)
   21.     └─vctrs::stop_incompatible_cast(...)
   22.       └─vctrs::stop_incompatible_type(...)
   23.         └─vctrs:::stop_incompatible(...)
   24.           └─vctrs:::stop_vctrs(...)
   25.             └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = call)
  ── Error ('test-addCohortIntersect.R:466:3'): working examples ─────────────────
  <vctrs_error_cast/vctrs_error_incompatible_type/vctrs_error_incompatible/vctrs_error/rlang_error/error/condition>
  Error in `as.character(cohort_ref[[2]]$x)`: Can't convert `x` <dbplyr_table_ident> to <character>.
  Backtrace:
       ▆
    1. ├─PatientProfiles::mockPatientProfiles(...) at test-addCohortIntersect.R:466:2
    2. │ └─CDMConnector::cdm_from_con(...)
    3. │   └─CDMConnector::new_generated_cohort_set(...)
    4. │     ├─... %>% stringr::str_remove_all("[^A-Za-z0-9_]")
    5. │     ├─base::rev(...)
    6. │     ├─stringr::str_split(as.character(cohort_ref[[2]]$x), "\\.")
    7. │     │ └─stringr:::check_lengths(string, pattern)
    8. │     │   └─vctrs::vec_size_common(...)
    9. │     ├─base::as.character(cohort_ref[[2]]$x)
   10. │     └─vctrs:::as.character.vctrs_vctr(cohort_ref[[2]]$x)
   11. │       └─vctrs::vec_cast(x, character())
   12. ├─stringr::str_remove_all(., "[^A-Za-z0-9_]")
   13. │ └─stringr::str_replace_all(string, pattern, "")
   14. │   └─stringr:::check_lengths(string, pattern, replacement)
   15. │     └─vctrs::vec_size_common(...)
   16. └─vctrs (local) `<fn>`()
   17.   └─vctrs::vec_default_cast(...)
   18.     ├─base::withRestarts(...)
   19.     │ └─base (local) withOneRestart(expr, restarts[[1L]])
   20.     │   └─base (local) doWithOneRestart(return(expr), restart)
   21.     └─vctrs::stop_incompatible_cast(...)
   22.       └─vctrs::stop_incompatible_type(...)
   23.         └─vctrs:::stop_incompatible(...)
   24.           └─vctrs:::stop_vctrs(...)
   25.             └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = call)
  ── Error ('test-addCohortIntersect.R:572:3'): working examples ─────────────────
  <vctrs_error_cast/vctrs_error_incompatible_type/vctrs_error_incompatible/vctrs_error/rlang_error/error/condition>
  Error in `as.character(cohort_ref[[2]]$x)`: Can't convert `x` <dbplyr_table_ident> to <character>.
  Backtrace:
       ▆
    1. ├─PatientProfiles::mockPatientProfiles(...) at test-addCohortIntersect.R:572:2
    2. │ └─CDMConnector::cdm_from_con(...)
    3. │   └─CDMConnector::new_generated_cohort_set(...)
    4. │     ├─... %>% stringr::str_remove_all("[^A-Za-z0-9_]")
    5. │     ├─base::rev(...)
    6. │     ├─stringr::str_split(as.character(cohort_ref[[2]]$x), "\\.")
    7. │     │ └─stringr:::check_lengths(string, pattern)
    8. │     │   └─vctrs::vec_size_common(...)
    9. │     ├─base::as.character(cohort_ref[[2]]$x)
   10. │     └─vctrs:::as.character.vctrs_vctr(cohort_ref[[2]]$x)
   11. │       └─vctrs::vec_cast(x, character())
   12. ├─stringr::str_remove_all(., "[^A-Za-z0-9_]")
   13. │ └─stringr::str_replace_all(string, pattern, "")
   14. │   └─stringr:::check_lengths(string, pattern, replacement)
   15. │     └─vctrs::vec_size_common(...)
   16. └─vctrs (local) `<fn>`()
   17.   └─vctrs::vec_default_cast(...)
   18.     ├─base::withRestarts(...)
   19.     │ └─base (local) withOneRestart(expr, restarts[[1L]])
   20.     │   └─base (local) doWithOneRestart(return(expr), restart)
   21.     └─vctrs::stop_incompatible_cast(...)
   22.       └─vctrs::stop_incompatible_type(...)
   23.         └─vctrs:::stop_incompatible(...)
   24.           └─vctrs:::stop_vctrs(...)
   25.             └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = call)
  ── Error ('test-addCohortIntersect.R:659:3'): working examples ─────────────────
  <vctrs_error_cast/vctrs_error_incompatible_type/vctrs_error_incompatible/vctrs_error/rlang_error/error/condition>
  Error in `as.character(cohort_ref[[2]]$x)`: Can't convert `x` <dbplyr_table_ident> to <character>.
  Backtrace:
       ▆
    1. ├─PatientProfiles::mockPatientProfiles(...) at test-addCohortIntersect.R:659:2
    2. │ └─CDMConnector::cdm_from_con(...)
    3. │   └─CDMConnector::new_generated_cohort_set(...)
    4. │     ├─... %>% stringr::str_remove_all("[^A-Za-z0-9_]")
    5. │     ├─base::rev(...)
    6. │     ├─stringr::str_split(as.character(cohort_ref[[2]]$x), "\\.")
    7. │     │ └─stringr:::check_lengths(string, pattern)
    8. │     │   └─vctrs::vec_size_common(...)
    9. │     ├─base::as.character(cohort_ref[[2]]$x)
   10. │     └─vctrs:::as.character.vctrs_vctr(cohort_ref[[2]]$x)
   11. │       └─vctrs::vec_cast(x, character())
   12. ├─stringr::str_remove_all(., "[^A-Za-z0-9_]")
   13. │ └─stringr::str_replace_all(string, pattern, "")
   14. │   └─stringr:::check_lengths(string, pattern, replacement)
   15. │     └─vctrs::vec_size_common(...)
   16. └─vctrs (local) `<fn>`()
   17.   └─vctrs::vec_default_cast(...)
   18.     ├─base::withRestarts(...)
   19.     │ └─base (local) withOneRestart(expr, restarts[[1L]])
   20.     │   └─base (local) doWithOneRestart(return(expr), restart)
   21.     └─vctrs::stop_incompatible_cast(...)
   22.       └─vctrs::stop_incompatible_type(...)
   23.         └─vctrs:::stop_incompatible(...)
   24.           └─vctrs:::stop_vctrs(...)
   25.             └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = call)
  ── Error ('test-addCohortIntersect.R:738:3'): censorDate functionality ─────────
  <vctrs_error_cast/vctrs_error_incompatible_type/vctrs_error_incompatible/vctrs_error/rlang_error/error/condition>
  Error in `as.character(cohort_ref[[2]]$x)`: Can't convert `x` <dbplyr_table_ident> to <character>.
  Backtrace:
       ▆
    1. ├─PatientProfiles::mockPatientProfiles(...) at test-addCohortIntersect.R:738:2
    2. │ └─CDMConnector::cdm_from_con(...)
    3. │   └─CDMConnector::new_generated_cohort_set(...)
    4. │     ├─... %>% stringr::str_remove_all("[^A-Za-z0-9_]")
    5. │     ├─base::rev(...)
    6. │     ├─stringr::str_split(as.character(cohort_ref[[2]]$x), "\\.")
    7. │     │ └─stringr:::check_lengths(string, pattern)
    8. │     │   └─vctrs::vec_size_common(...)
    9. │     ├─base::as.character(cohort_ref[[2]]$x)
   10. │     └─vctrs:::as.character.vctrs_vctr(cohort_ref[[2]]$x)
   11. │       └─vctrs::vec_cast(x, character())
   12. ├─stringr::str_remove_all(., "[^A-Za-z0-9_]")
   13. │ └─stringr::str_replace_all(string, pattern, "")
   14. │   └─stringr:::check_lengths(string, pattern, replacement)
   15. │     └─vctrs::vec_size_common(...)
   16. └─vctrs (local) `<fn>`()
   17.   └─vctrs::vec_default_cast(...)
   18.     ├─base::withRestarts(...)
   19.     │ └─base (local) withOneRestart(expr, restarts[[1L]])
   20.     │   └─base (local) doWithOneRestart(return(expr), restart)
   21.     └─vctrs::stop_incompatible_cast(...)
   22.       └─vctrs::stop_incompatible_type(...)
   23.         └─vctrs:::stop_incompatible(...)
   24.           └─vctrs:::stop_vctrs(...)
   25.             └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = call)
  ── Error ('test-addFutureObservation.R:2:3'): check input length and type for each of the arguments ──
  <vctrs_error_cast/vctrs_error_incompatible_type/vctrs_error_incompatible/vctrs_error/rlang_error/error/condition>
  Error in `as.character(cohort_ref[[2]]$x)`: Can't convert `x` <dbplyr_table_ident> to <character>.
  Backtrace:
       ▆
    1. ├─PatientProfiles::mockPatientProfiles(...) at test-addFutureObservation.R:2:2
    2. │ └─CDMConnector::cdm_from_con(...)
    3. │   └─CDMConnector::new_generated_cohort_set(...)
    4. │     ├─... %>% stringr::str_remove_all("[^A-Za-z0-9_]")
    5. │     ├─base::rev(...)
    6. │     ├─stringr::str_split(as.character(cohort_ref[[2]]$x), "\\.")
    7. │     │ └─stringr:::check_lengths(string, pattern)
    8. │     │   └─vctrs::vec_size_common(...)
    9. │     ├─base::as.character(cohort_ref[[2]]$x)
   10. │     └─vctrs:::as.character.vctrs_vctr(cohort_ref[[2]]$x)
   11. │       └─vctrs::vec_cast(x, character())
   12. ├─stringr::str_remove_all(., "[^A-Za-z0-9_]")
   13. │ └─stringr::str_replace_all(string, pattern, "")
   14. │   └─stringr:::check_lengths(string, pattern, replacement)
   15. │     └─vctrs::vec_size_common(...)
   16. └─vctrs (local) `<fn>`()
   17.   └─vctrs::vec_default_cast(...)
   18.     ├─base::withRestarts(...)
   19.     │ └─base (local) withOneRestart(expr, restarts[[1L]])
   20.     │   └─base (local) doWithOneRestart(return(expr), restart)
   21.     └─vctrs::stop_incompatible_cast(...)
   22.       └─vctrs::stop_incompatible_type(...)
   23.         └─vctrs:::stop_incompatible(...)
   24.           └─vctrs:::stop_vctrs(...)
   25.             └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = call)
  ── Error ('test-addFutureObservation.R:21:3'): check condition_occurrence and cohort1 work ──
  <vctrs_error_cast/vctrs_error_incompatible_type/vctrs_error_incompatible/vctrs_error/rlang_error/error/condition>
  Error in `as.character(cohort_ref[[2]]$x)`: Can't convert `x` <dbplyr_table_ident> to <character>.
  Backtrace:
       ▆
    1. ├─PatientProfiles::mockPatientProfiles(...) at test-addFutureObservation.R:21:2
    2. │ └─CDMConnector::cdm_from_con(...)
    3. │   └─CDMConnector::new_generated_cohort_set(...)
    4. │     ├─... %>% stringr::str_remove_all("[^A-Za-z0-9_]")
    5. │     ├─base::rev(...)
    6. │     ├─stringr::str_split(as.character(cohort_ref[[2]]$x), "\\.")
    7. │     │ └─stringr:::check_lengths(string, pattern)
    8. │     │   └─vctrs::vec_size_common(...)
    9. │     ├─base::as.character(cohort_ref[[2]]$x)
   10. │     └─vctrs:::as.character.vctrs_vctr(cohort_ref[[2]]$x)
   11. │       └─vctrs::vec_cast(x, character())
   12. ├─stringr::str_remove_all(., "[^A-Za-z0-9_]")
   13. │ └─stringr::str_replace_all(string, pattern, "")
   14. │   └─stringr:::check_lengths(string, pattern, replacement)
   15. │     └─vctrs::vec_size_common(...)
   16. └─vctrs (local) `<fn>`()
   17.   └─vctrs::vec_default_cast(...)
   18.     ├─base::withRestarts(...)
   19.     │ └─base (local) withOneRestart(expr, restarts[[1L]])
   20.     │   └─base (local) doWithOneRestart(return(expr), restart)
   21.     └─vctrs::stop_incompatible_cast(...)
   22.       └─vctrs::stop_incompatible_type(...)
   23.         └─vctrs:::stop_incompatible(...)
   24.           └─vctrs:::stop_vctrs(...)
   25.             └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = call)
  ── Error ('test-addFutureObservation.R:70:3'): check working example with cohort1 ──
  <vctrs_error_cast/vctrs_error_incompatible_type/vctrs_error_incompatible/vctrs_error/rlang_error/error/condition>
  Error in `as.character(cohort_ref[[2]]$x)`: Can't convert `x` <dbplyr_table_ident> to <character>.
  Backtrace:
       ▆
    1. ├─PatientProfiles::mockPatientProfiles(...) at test-addFutureObservation.R:70:2
    2. │ └─CDMConnector::cdm_from_con(...)
    3. │   └─CDMConnector::new_generated_cohort_set(...)
    4. │     ├─... %>% stringr::str_remove_all("[^A-Za-z0-9_]")
    5. │     ├─base::rev(...)
    6. │     ├─stringr::str_split(as.character(cohort_ref[[2]]$x), "\\.")
    7. │     │ └─stringr:::check_lengths(string, pattern)
    8. │     │   └─vctrs::vec_size_common(...)
    9. │     ├─base::as.character(cohort_ref[[2]]$x)
   10. │     └─vctrs:::as.character.vctrs_vctr(cohort_ref[[2]]$x)
   11. │       └─vctrs::vec_cast(x, character())
   12. ├─stringr::str_remove_all(., "[^A-Za-z0-9_]")
   13. │ └─stringr::str_replace_all(string, pattern, "")
   14. │   └─stringr:::check_lengths(string, pattern, replacement)
   15. │     └─vctrs::vec_size_common(...)
   16. └─vctrs (local) `<fn>`()
   17.   └─vctrs::vec_default_cast(...)
   18.     ├─base::withRestarts(...)
   19.     │ └─base (local) withOneRestart(expr, restarts[[1L]])
   20.     │   └─base (local) doWithOneRestart(return(expr), restart)
   21.     └─vctrs::stop_incompatible_cast(...)
   22.       └─vctrs::stop_incompatible_type(...)
   23.         └─vctrs:::stop_incompatible(...)
   24.           └─vctrs:::stop_vctrs(...)
   25.             └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = call)
  ── Error ('test-addFutureObservation.R:137:3'): check working example with condition_occurrence ──
  <vctrs_error_cast/vctrs_error_incompatible_type/vctrs_error_incompatible/vctrs_error/rlang_error/error/condition>
  Error in `as.character(cohort_ref[[2]]$x)`: Can't convert `x` <dbplyr_table_ident> to <character>.
  Backtrace:
       ▆
    1. ├─PatientProfiles::mockPatientProfiles(...) at test-addFutureObservation.R:137:2
    2. │ └─CDMConnector::cdm_from_con(...)
    3. │   └─CDMConnector::new_generated_cohort_set(...)
    4. │     ├─... %>% stringr::str_remove_all("[^A-Za-z0-9_]")
    5. │     ├─base::rev(...)
    6. │     ├─stringr::str_split(as.character(cohort_ref[[2]]$x), "\\.")
    7. │     │ └─stringr:::check_lengths(string, pattern)
    8. │     │   └─vctrs::vec_size_common(...)
    9. │     ├─base::as.character(cohort_ref[[2]]$x)
   10. │     └─vctrs:::as.character.vctrs_vctr(cohort_ref[[2]]$x)
   11. │       └─vctrs::vec_cast(x, character())
   12. ├─stringr::str_remove_all(., "[^A-Za-z0-9_]")
   13. │ └─stringr::str_replace_all(string, pattern, "")
   14. │   └─stringr:::check_lengths(string, pattern, replacement)
   15. │     └─vctrs::vec_size_common(...)
   16. └─vctrs (local) `<fn>`()
   17.   └─vctrs::vec_default_cast(...)
   18.     ├─base::withRestarts(...)
   19.     │ └─base (local) withOneRestart(expr, restarts[[1L]])
   20.     │   └─base (local) doWithOneRestart(return(expr), restart)
   21.     └─vctrs::stop_incompatible_cast(...)
   22.       └─vctrs::stop_incompatible_type(...)
   23.         └─vctrs:::stop_incompatible(...)
   24.           └─vctrs:::stop_vctrs(...)
   25.             └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = call)
  ── Error ('test-addFutureObservation.R:205:3'): different name ─────────────────
  <vctrs_error_cast/vctrs_error_incompatible_type/vctrs_error_incompatible/vctrs_error/rlang_error/error/condition>
  Error in `as.character(cohort_ref[[2]]$x)`: Can't convert `x` <dbplyr_table_ident> to <character>.
  Backtrace:
       ▆
    1. ├─PatientProfiles::mockPatientProfiles(...) at test-addFutureObservation.R:205:2
    2. │ └─CDMConnector::cdm_from_con(...)
    3. │   └─CDMConnector::new_generated_cohort_set(...)
    4. │     ├─... %>% stringr::str_remove_all("[^A-Za-z0-9_]")
    5. │     ├─base::rev(...)
    6. │     ├─stringr::str_split(as.character(cohort_ref[[2]]$x), "\\.")
    7. │     │ └─stringr:::check_lengths(string, pattern)
    8. │     │   └─vctrs::vec_size_common(...)
    9. │     ├─base::as.character(cohort_ref[[2]]$x)
   10. │     └─vctrs:::as.character.vctrs_vctr(cohort_ref[[2]]$x)
   11. │       └─vctrs::vec_cast(x, character())
   12. ├─stringr::str_remove_all(., "[^A-Za-z0-9_]")
   13. │ └─stringr::str_replace_all(string, pattern, "")
   14. │   └─stringr:::check_lengths(string, pattern, replacement)
   15. │     └─vctrs::vec_size_common(...)
   16. └─vctrs (local) `<fn>`()
   17.   └─vctrs::vec_default_cast(...)
   18.     ├─base::withRestarts(...)
   19.     │ └─base (local) withOneRestart(expr, restarts[[1L]])
   20.     │   └─base (local) doWithOneRestart(return(expr), restart)
   21.     └─vctrs::stop_incompatible_cast(...)
   22.       └─vctrs::stop_incompatible_type(...)
   23.         └─vctrs:::stop_incompatible(...)
   24.           └─vctrs:::stop_vctrs(...)
   25.             └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = call)
  ── Error ('test-addFutureObservation.R:251:3'): priorHistory and future_observation - outside of observation period ──
  <vctrs_error_cast/vctrs_error_incompatible_type/vctrs_error_incompatible/vctrs_error/rlang_error/error/condition>
  Error in `as.character(cohort_ref[[2]]$x)`: Can't convert `x` <dbplyr_table_ident> to <character>.
  Backtrace:
       ▆
    1. ├─PatientProfiles::mockPatientProfiles(...) at test-addFutureObservation.R:251:2
    2. │ └─CDMConnector::cdm_from_con(...)
    3. │   └─CDMConnector::new_generated_cohort_set(...)
    4. │     ├─... %>% stringr::str_remove_all("[^A-Za-z0-9_]")
    5. │     ├─base::rev(...)
    6. │     ├─stringr::str_split(as.character(cohort_ref[[2]]$x), "\\.")
    7. │     │ └─stringr:::check_lengths(string, pattern)
    8. │     │   └─vctrs::vec_size_common(...)
    9. │     ├─base::as.character(cohort_ref[[2]]$x)
   10. │     └─vctrs:::as.character.vctrs_vctr(cohort_ref[[2]]$x)
   11. │       └─vctrs::vec_cast(x, character())
   12. ├─stringr::str_remove_all(., "[^A-Za-z0-9_]")
   13. │ └─stringr::str_replace_all(string, pattern, "")
   14. │   └─stringr:::check_lengths(string, pattern, replacement)
   15. │     └─vctrs::vec_size_common(...)
   16. └─vctrs (local) `<fn>`()
   17.   └─vctrs::vec_default_cast(...)
   18.     ├─base::withRestarts(...)
   19.     │ └─base (local) withOneRestart(expr, restarts[[1L]])
   20.     │   └─base (local) doWithOneRestart(return(expr), restart)
   21.     └─vctrs::stop_incompatible_cast(...)
   22.       └─vctrs::stop_incompatible_type(...)
   23.         └─vctrs:::stop_incompatible(...)
   24.           └─vctrs:::stop_vctrs(...)
   25.             └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = call)
  ── Error ('test-addFutureObservation.R:298:3'): multiple observation periods ───
  <vctrs_error_cast/vctrs_error_incompatible_type/vctrs_error_incompatible/vctrs_error/rlang_error/error/condition>
  Error in `as.character(cohort_ref[[2]]$x)`: Can't convert `x` <dbplyr_table_ident> to <character>.
  Backtrace:
       ▆
    1. ├─PatientProfiles::mockPatientProfiles(...) at test-addFutureObservation.R:298:2
    2. │ └─CDMConnector::cdm_from_con(...)
    3. │   └─CDMConnector::new_generated_cohort_set(...)
    4. │     ├─... %>% stringr::str_remove_all("[^A-Za-z0-9_]")
    5. │     ├─base::rev(...)
    6. │     ├─stringr::str_split(as.character(cohort_ref[[2]]$x), "\\.")
    7. │     │ └─stringr:::check_lengths(string, pattern)
    8. │     │   └─vctrs::vec_size_common(...)
    9. │     ├─base::as.character(cohort_ref[[2]]$x)
   10. │     └─vctrs:::as.character.vctrs_vctr(cohort_ref[[2]]$x)
   11. │       └─vctrs::vec_cast(x, character())
   12. ├─stringr::str_remove_all(., "[^A-Za-z0-9_]")
   13. │ └─stringr::str_replace_all(string, pattern, "")
   14. │   └─stringr:::check_lengths(string, pattern, replacement)
   15. │     └─vctrs::vec_size_common(...)
   16. └─vctrs (local) `<fn>`()
   17.   └─vctrs::vec_default_cast(...)
   18.     ├─base::withRestarts(...)
   19.     │ └─base (local) withOneRestart(expr, restarts[[1L]])
   20.     │   └─base (local) doWithOneRestart(return(expr), restart)
   21.     └─vctrs::stop_incompatible_cast(...)
   22.       └─vctrs::stop_incompatible_type(...)
   23.         └─vctrs:::stop_incompatible(...)
   24.           └─vctrs:::stop_vctrs(...)
   25.             └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = call)
  ── Error ('test-addInObservation.R:2:3'): addInObservation, input length and type ──
  <vctrs_error_cast/vctrs_error_incompatible_type/vctrs_error_incompatible/vctrs_error/rlang_error/error/condition>
  Error in `as.character(cohort_ref[[2]]$x)`: Can't convert `x` <dbplyr_table_ident> to <character>.
  Backtrace:
       ▆
    1. ├─PatientProfiles::mockPatientProfiles(...) at test-addInObservation.R:2:2
    2. │ └─CDMConnector::cdm_from_con(...)
    3. │   └─CDMConnector::new_generated_cohort_set(...)
    4. │     ├─... %>% stringr::str_remove_all("[^A-Za-z0-9_]")
    5. │     ├─base::rev(...)
    6. │     ├─stringr::str_split(as.character(cohort_ref[[2]]$x), "\\.")
    7. │     │ └─stringr:::check_lengths(string, pattern)
    8. │     │   └─vctrs::vec_size_common(...)
    9. │     ├─base::as.character(cohort_ref[[2]]$x)
   10. │     └─vctrs:::as.character.vctrs_vctr(cohort_ref[[2]]$x)
   11. │       └─vctrs::vec_cast(x, character())
   12. ├─stringr::str_remove_all(., "[^A-Za-z0-9_]")
   13. │ └─stringr::str_replace_all(string, pattern, "")
   14. │   └─stringr:::check_lengths(string, pattern, replacement)
   15. │     └─vctrs::vec_size_common(...)
   16. └─vctrs (local) `<fn>`()
   17.   └─vctrs::vec_default_cast(...)
   18.     ├─base::withRestarts(...)
   19.     │ └─base (local) withOneRestart(expr, restarts[[1L]])
   20.     │   └─base (local) doWithOneRestart(return(expr), restart)
   21.     └─vctrs::stop_incompatible_cast(...)
   22.       └─vctrs::stop_incompatible_type(...)
   23.         └─vctrs:::stop_incompatible(...)
   24.           └─vctrs:::stop_vctrs(...)
   25.             └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = call)
  ── Error ('test-addInObservation.R:15:3'): addInObservation, cohort and condition_occurrence ──
  <vctrs_error_cast/vctrs_error_incompatible_type/vctrs_error_incompatible/vctrs_error/rlang_error/error/condition>
  Error in `as.character(cohort_ref[[2]]$x)`: Can't convert `x` <dbplyr_table_ident> to <character>.
  Backtrace:
       ▆
    1. ├─PatientProfiles::mockPatientProfiles(...) at test-addInObservation.R:15:2
    2. │ └─CDMConnector::cdm_from_con(...)
    3. │   └─CDMConnector::new_generated_cohort_set(...)
    4. │     ├─... %>% stringr::str_remove_all("[^A-Za-z0-9_]")
    5. │     ├─base::rev(...)
    6. │     ├─stringr::str_split(as.character(cohort_ref[[2]]$x), "\\.")
    7. │     │ └─stringr:::check_lengths(string, pattern)
    8. │     │   └─vctrs::vec_size_common(...)
    9. │     ├─base::as.character(cohort_ref[[2]]$x)
   10. │     └─vctrs:::as.character.vctrs_vctr(cohort_ref[[2]]$x)
   11. │       └─vctrs::vec_cast(x, character())
   12. ├─stringr::str_remove_all(., "[^A-Za-z0-9_]")
   13. │ └─stringr::str_replace_all(string, pattern, "")
   14. │   └─stringr:::check_lengths(string, pattern, replacement)
   15. │     └─vctrs::vec_size_common(...)
   16. └─vctrs (local) `<fn>`()
   17.   └─vctrs::vec_default_cast(...)
   18.     ├─base::withRestarts(...)
   19.     │ └─base (local) withOneRestart(expr, restarts[[1L]])
   20.     │   └─base (local) doWithOneRestart(return(expr), restart)
   21.     └─vctrs::stop_incompatible_cast(...)
   22.       └─vctrs::stop_incompatible_type(...)
   23.         └─vctrs:::stop_incompatible(...)
   24.           └─vctrs:::stop_vctrs(...)
   25.             └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = call)
  ── Error ('test-addInObservation.R:37:3'): addInObservation, parameters ────────
  <vctrs_error_cast/vctrs_error_incompatible_type/vctrs_error_incompatible/vctrs_error/rlang_error/error/condition>
  Error in `as.character(cohort_ref[[2]]$x)`: Can't convert `x` <dbplyr_table_ident> to <character>.
  Backtrace:
       ▆
    1. ├─PatientProfiles::mockPatientProfiles(...) at test-addInObservation.R:37:2
    2. │ └─CDMConnector::cdm_from_con(...)
    3. │   └─CDMConnector::new_generated_cohort_set(...)
    4. │     ├─... %>% stringr::str_remove_all("[^A-Za-z0-9_]")
    5. │     ├─base::rev(...)
    6. │     ├─stringr::str_split(as.character(cohort_ref[[2]]$x), "\\.")
    7. │     │ └─stringr:::check_lengths(string, pattern)
    8. │     │   └─vctrs::vec_size_common(...)
    9. │     ├─base::as.character(cohort_ref[[2]]$x)
   10. │     └─vctrs:::as.character.vctrs_vctr(cohort_ref[[2]]$x)
   11. │       └─vctrs::vec_cast(x, character())
   12. ├─stringr::str_remove_all(., "[^A-Za-z0-9_]")
   13. │ └─stringr::str_replace_all(string, pattern, "")
   14. │   └─stringr:::check_lengths(string, pattern, replacement)
   15. │     └─vctrs::vec_size_common(...)
   16. └─vctrs (local) `<fn>`()
   17.   └─vctrs::vec_default_cast(...)
   18.     ├─base::withRestarts(...)
   19.     │ └─base (local) withOneRestart(expr, restarts[[1L]])
   20.     │   └─base (local) doWithOneRestart(return(expr), restart)
   21.     └─vctrs::stop_incompatible_cast(...)
   22.       └─vctrs::stop_incompatible_type(...)
   23.         └─vctrs:::stop_incompatible(...)
   24.           └─vctrs:::stop_vctrs(...)
   25.             └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = call)
  ── Error ('test-addDemographics.R:2:3'): addDemographics, input length, type ───
  <vctrs_error_cast/vctrs_error_incompatible_type/vctrs_error_incompatible/vctrs_error/rlang_error/error/condition>
  Error in `as.character(cohort_ref[[2]]$x)`: Can't convert `x` <dbplyr_table_ident> to <character>.
  Backtrace:
       ▆
    1. ├─PatientProfiles::mockPatientProfiles(...) at test-addDemographics.R:2:2
    2. │ └─CDMConnector::cdm_from_con(...)
    3. │   └─CDMConnector::new_generated_cohort_set(...)
    4. │     ├─... %>% stringr::str_remove_all("[^A-Za-z0-9_]")
    5. │     ├─base::rev(...)
    6. │     ├─stringr::str_split(as.character(cohort_ref[[2]]$x), "\\.")
    7. │     │ └─stringr:::check_lengths(string, pattern)
    8. │     │   └─vctrs::vec_size_common(...)
    9. │     ├─base::as.character(cohort_ref[[2]]$x)
   10. │     └─vctrs:::as.character.vctrs_vctr(cohort_ref[[2]]$x)
   11. │       └─vctrs::vec_cast(x, character())
   12. ├─stringr::str_remove_all(., "[^A-Za-z0-9_]")
   13. │ └─stringr::str_replace_all(string, pattern, "")
   14. │   └─stringr:::check_lengths(string, pattern, replacement)
   15. │     └─vctrs::vec_size_common(...)
   16. └─vctrs (local) `<fn>`()
   17.   └─vctrs::vec_default_cast(...)
   18.     ├─base::withRestarts(...)
   19.     │ └─base (local) withOneRestart(expr, restarts[[1L]])
   20.     │   └─base (local) doWithOneRestart(return(expr), restart)
   21.     └─vctrs::stop_incompatible_cast(...)
   22.       └─vctrs::stop_incompatible_type(...)
   23.         └─vctrs:::stop_incompatible(...)
   24.           └─vctrs:::stop_vctrs(...)
   25.             └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = call)
  ── Error ('test-addDemographics.R:13:3'): addDemographics, cohort and condition_occurrence ──
  <vctrs_error_cast/vctrs_error_incompatible_type/vctrs_error_incompatible/vctrs_error/rlang_error/error/condition>
  Error in `as.character(cohort_ref[[2]]$x)`: Can't convert `x` <dbplyr_table_ident> to <character>.
  Backtrace:
       ▆
    1. ├─PatientProfiles::mockPatientProfiles(...) at test-addDemographics.R:13:2
    2. │ └─CDMConnector::cdm_from_con(...)
    3. │   └─CDMConnector::new_generated_cohort_set(...)
    4. │     ├─... %>% stringr::str_remove_all("[^A-Za-z0-9_]")
    5. │     ├─base::rev(...)
    6. │     ├─stringr::str_split(as.character(cohort_ref[[2]]$x), "\\.")
    7. │     │ └─stringr:::check_lengths(string, pattern)
    8. │     │   └─vctrs::vec_size_common(...)
    9. │     ├─base::as.character(cohort_ref[[2]]$x)
   10. │     └─vctrs:::as.character.vctrs_vctr(cohort_ref[[2]]$x)
   11. │       └─vctrs::vec_cast(x, character())
   12. ├─stringr::str_remove_all(., "[^A-Za-z0-9_]")
   13. │ └─stringr::str_replace_all(string, pattern, "")
   14. │   └─stringr:::check_lengths(string, pattern, replacement)
   15. │     └─vctrs::vec_size_common(...)
   16. └─vctrs (local) `<fn>`()
   17.   └─vctrs::vec_default_cast(...)
   18.     ├─base::withRestarts(...)
   19.     │ └─base (local) withOneRestart(expr, restarts[[1L]])
   20.     │   └─base (local) doWithOneRestart(return(expr), restart)
   21.     └─vctrs::stop_incompatible_cast(...)
   22.       └─vctrs::stop_incompatible_type(...)
   23.         └─vctrs:::stop_incompatible(...)
   24.           └─vctrs:::stop_vctrs(...)
   25.             └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = call)
  ── Error ('test-addDemographics.R:91:3'): addDemographics, parameters ──────────
  <vctrs_error_cast/vctrs_error_incompatible_type/vctrs_error_incompatible/vctrs_error/rlang_error/error/condition>
  Error in `as.character(cohort_ref[[2]]$x)`: Can't convert `x` <dbplyr_table_ident> to <character>.
  Backtrace:
       ▆
    1. ├─PatientProfiles::mockPatientProfiles(...) at test-addDemographics.R:91:2
    2. │ └─CDMConnector::cdm_from_con(...)
    3. │   └─CDMConnector::new_generated_cohort_set(...)
    4. │     ├─... %>% stringr::str_remove_all("[^A-Za-z0-9_]")
    5. │     ├─base::rev(...)
    6. │     ├─stringr::str_split(as.character(cohort_ref[[2]]$x), "\\.")
    7. │     │ └─stringr:::check_lengths(string, pattern)
    8. │     │   └─vctrs::vec_size_common(...)
    9. │     ├─base::as.character(cohort_ref[[2]]$x)
   10. │     └─vctrs:::as.character.vctrs_vctr(cohort_ref[[2]]$x)
   11. │       └─vctrs::vec_cast(x, character())
   12. ├─stringr::str_remove_all(., "[^A-Za-z0-9_]")
   13. │ └─stringr::str_replace_all(string, pattern, "")
   14. │   └─stringr:::check_lengths(string, pattern, replacement)
   15. │     └─vctrs::vec_size_common(...)
   16. └─vctrs (local) `<fn>`()
   17.   └─vctrs::vec_default_cast(...)
   18.     ├─base::withRestarts(...)
   19.     │ └─base (local) withOneRestart(expr, restarts[[1L]])
   20.     │   └─base (local) doWithOneRestart(return(expr), restart)
   21.     └─vctrs::stop_incompatible_cast(...)
   22.       └─vctrs::stop_incompatible_type(...)
   23.         └─vctrs:::stop_incompatible(...)
   24.           └─vctrs:::stop_vctrs(...)
   25.             └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = call)
  ── Error ('test-addDemographics.R:136:3'): partial demographics - cohorts ──────
  <vctrs_error_cast/vctrs_error_incompatible_type/vctrs_error_incompatible/vctrs_error/rlang_error/error/condition>
  Error in `as.character(cohort_ref[[2]]$x)`: Can't convert `x` <dbplyr_table_ident> to <character>.
  Backtrace:
       ▆
    1. ├─PatientProfiles::mockPatientProfiles(...) at test-addDemographics.R:136:2
    2. │ └─CDMConnector::cdm_from_con(...)
    3. │   └─CDMConnector::new_generated_cohort_set(...)
    4. │     ├─... %>% stringr::str_remove_all("[^A-Za-z0-9_]")
    5. │     ├─base::rev(...)
    6. │     ├─stringr::str_split(as.character(cohort_ref[[2]]$x), "\\.")
    7. │     │ └─stringr:::check_lengths(string, pattern)
    8. │     │   └─vctrs::vec_size_common(...)
    9. │     ├─base::as.character(cohort_ref[[2]]$x)
   10. │     └─vctrs:::as.character.vctrs_vctr(cohort_ref[[2]]$x)
   11. │       └─vctrs::vec_cast(x, character())
   12. ├─stringr::str_remove_all(., "[^A-Za-z0-9_]")
   13. │ └─stringr::str_replace_all(string, pattern, "")
   14. │   └─stringr:::check_lengths(string, pattern, replacement)
   15. │     └─vctrs::vec_size_common(...)
   16. └─vctrs (local) `<fn>`()
   17.   └─vctrs::vec_default_cast(...)
   18.     ├─base::withRestarts(...)
   19.     │ └─base (local) withOneRestart(expr, restarts[[1L]])
   20.     │   └─base (local) doWithOneRestart(return(expr), restart)
   21.     └─vctrs::stop_incompatible_cast(...)
   22.       └─vctrs::stop_incompatible_type(...)
   23.         └─vctrs:::stop_incompatible(...)
   24.           └─vctrs:::stop_vctrs(...)
   25.             └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = call)
  ── Error ('test-addDemographics.R:239:3'): partial demographics - omop tables ──
  <vctrs_error_cast/vctrs_error_incompatible_type/vctrs_error_incompatible/vctrs_error/rlang_error/error/condition>
  Error in `as.character(cohort_ref[[2]]$x)`: Can't convert `x` <dbplyr_table_ident> to <character>.
  Backtrace:
       ▆
    1. ├─PatientProfiles::mockPatientProfiles(...) at test-addDemographics.R:239:2
    2. │ └─CDMConnector::cdm_from_con(...)
    3. │   └─CDMConnector::new_generated_cohort_set(...)
    4. │     ├─... %>% stringr::str_remove_all("[^A-Za-z0-9_]")
    5. │     ├─base::rev(...)
    6. │     ├─stringr::str_split(as.character(cohort_ref[[2]]$x), "\\.")
    7. │     │ └─stringr:::check_lengths(string, pattern)
    8. │     │   └─vctrs::vec_size_common(...)
    9. │     ├─base::as.character(cohort_ref[[2]]$x)
   10. │     └─vctrs:::as.character.vctrs_vctr(cohort_ref[[2]]$x)
   11. │       └─vctrs::vec_cast(x, character())
   12. ├─stringr::str_remove_all(., "[^A-Za-z0-9_]")
   13. │ └─stringr::str_replace_all(string, pattern, "")
   14. │   └─stringr:::check_lengths(string, pattern, replacement)
   15. │     └─vctrs::vec_size_common(...)
   16. └─vctrs (local) `<fn>`()
   17.   └─vctrs::vec_default_cast(...)
   18.     ├─base::withRestarts(...)
   19.     │ └─base (local) withOneRestart(expr, restarts[[1L]])
   20.     │   └─base (local) doWithOneRestart(return(expr), restart)
   21.     └─vctrs::stop_incompatible_cast(...)
   22.       └─vctrs::stop_incompatible_type(...)
   23.         └─vctrs:::stop_incompatible(...)
   24.           └─vctrs:::stop_vctrs(...)
   25.             └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = call)
  ── Error ('test-addDemographics.R:324:3'): priorObservation and future_observation - outside of observation period ──
  <vctrs_error_cast/vctrs_error_incompatible_type/vctrs_error_incompatible/vctrs_error/rlang_error/error/condition>
  Error in `as.character(cohort_ref[[2]]$x)`: Can't convert `x` <dbplyr_table_ident> to <character>.
  Backtrace:
       ▆
    1. ├─PatientProfiles::mockPatientProfiles(...) at test-addDemographics.R:324:2
    2. │ └─CDMConnector::cdm_from_con(...)
    3. │   └─CDMConnector::new_generated_cohort_set(...)
    4. │     ├─... %>% stringr::str_remove_all("[^A-Za-z0-9_]")
    5. │     ├─base::rev(...)
    6. │     ├─stringr::str_split(as.character(cohort_ref[[2]]$x), "\\.")
    7. │     │ └─stringr:::check_lengths(string, pattern)
    8. │     │   └─vctrs::vec_size_common(...)
    9. │     ├─base::as.character(cohort_ref[[2]]$x)
   10. │     └─vctrs:::as.character.vctrs_vctr(cohort_ref[[2]]$x)
   11. │       └─vctrs::vec_cast(x, character())
   12. ├─stringr::str_remove_all(., "[^A-Za-z0-9_]")
   13. │ └─stringr::str_replace_all(string, pattern, "")
   14. │   └─stringr:::check_lengths(string, pattern, replacement)
   15. │     └─vctrs::vec_size_common(...)
   16. └─vctrs (local) `<fn>`()
   17.   └─vctrs::vec_default_cast(...)
   18.     ├─base::withRestarts(...)
   19.     │ └─base (local) withOneRestart(expr, restarts[[1L]])
   20.     │   └─base (local) doWithOneRestart(return(expr), restart)
   21.     └─vctrs::stop_incompatible_cast(...)
   22.       └─vctrs::stop_incompatible_type(...)
   23.         └─vctrs:::stop_incompatible(...)
   24.           └─vctrs:::stop_vctrs(...)
   25.             └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = call)
  ── Error ('test-addDemographics.R:377:3'): priorObservation - multiple observation periods ──
  <vctrs_error_cast/vctrs_error_incompatible_type/vctrs_error_incompatible/vctrs_error/rlang_error/error/condition>
  Error in `as.character(cohort_ref[[2]]$x)`: Can't convert `x` <dbplyr_table_ident> to <character>.
  Backtrace:
       ▆
    1. ├─PatientProfiles::mockPatientProfiles(...) at test-addDemographics.R:377:2
    2. │ └─CDMConnector::cdm_from_con(...)
    3. │   └─CDMConnector::new_generated_cohort_set(...)
    4. │     ├─... %>% stringr::str_remove_all("[^A-Za-z0-9_]")
    5. │     ├─base::rev(...)
    6. │     ├─stringr::str_split(as.character(cohort_ref[[2]]$x), "\\.")
    7. │     │ └─stringr:::check_lengths(string, pattern)
    8. │     │   └─vctrs::vec_size_common(...)
    9. │     ├─base::as.character(cohort_ref[[2]]$x)
   10. │     └─vctrs:::as.character.vctrs_vctr(cohort_ref[[2]]$x)
   11. │       └─vctrs::vec_cast(x, character())
   12. ├─stringr::str_remove_all(., "[^A-Za-z0-9_]")
   13. │ └─stringr::str_replace_all(string, pattern, "")
   14. │   └─stringr:::check_lengths(string, pattern, replacement)
   15. │     └─vctrs::vec_size_common(...)
   16. └─vctrs (local) `<fn>`()
   17.   └─vctrs::vec_default_cast(...)
   18.     ├─base::withRestarts(...)
   19.     │ └─base (local) withOneRestart(expr, restarts[[1L]])
   20.     │   └─base (local) doWithOneRestart(return(expr), restart)
   21.     └─vctrs::stop_incompatible_cast(...)
   22.       └─vctrs::stop_incompatible_type(...)
   23.         └─vctrs:::stop_incompatible(...)
   24.           └─vctrs:::stop_vctrs(...)
   25.             └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = call)
  ── Error ('test-addDemographics.R:419:3'): check that no extra rows are added ──
  <vctrs_error_cast/vctrs_error_incompatible_type/vctrs_error_incompatible/vctrs_error/rlang_error/error/condition>
  Error in `as.character(cohort_ref[[2]]$x)`: Can't convert `x` <dbplyr_table_ident> to <character>.
  Backtrace:
       ▆
    1. ├─PatientProfiles::mockPatientProfiles(...) at test-addDemographics.R:419:2
    2. │ └─CDMConnector::cdm_from_con(...)
    3. │   └─CDMConnector::new_generated_cohort_set(...)
    4. │     ├─... %>% stringr::str_remove_all("[^A-Za-z0-9_]")
    5. │     ├─base::rev(...)
    6. │     ├─stringr::str_split(as.character(cohort_ref[[2]]$x), "\\.")
    7. │     │ └─stringr:::check_lengths(string, pattern)
    8. │     │   └─vctrs::vec_size_common(...)
    9. │     ├─base::as.character(cohort_ref[[2]]$x)
   10. │     └─vctrs:::as.character.vctrs_vctr(cohort_ref[[2]]$x)
   11. │       └─vctrs::vec_cast(x, character())
   12. ├─stringr::str_remove_all(., "[^A-Za-z0-9_]")
   13. │ └─stringr::str_replace_all(string, pattern, "")
   14. │   └─stringr:::check_lengths(string, pattern, replacement)
   15. │     └─vctrs::vec_size_common(...)
   16. └─vctrs (local) `<fn>`()
   17.   └─vctrs::vec_default_cast(...)
   18.     ├─base::withRestarts(...)
   19.     │ └─base (local) withOneRestart(expr, restarts[[1L]])
   20.     │   └─base (local) doWithOneRestart(return(expr), restart)
   21.     └─vctrs::stop_incompatible_cast(...)
   22.       └─vctrs::stop_incompatible_type(...)
   23.         └─vctrs:::stop_incompatible(...)
   24.           └─vctrs:::stop_vctrs(...)
   25.             └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = call)
  ── Error ('test-addDemographics.R:517:3'): age at cohort end, no missing, check age computation ──
  <vctrs_error_cast/vctrs_error_incompatible_type/vctrs_error_incompatible/vctrs_error/rlang_error/error/condition>
  Error in `as.character(cohort_ref[[2]]$x)`: Can't convert `x` <dbplyr_table_ident> to <character>.
  Backtrace:
       ▆
    1. ├─PatientProfiles::mockPatientProfiles(...) at test-addDemographics.R:517:2
    2. │ └─CDMConnector::cdm_from_con(...)
    3. │   └─CDMConnector::new_generated_cohort_set(...)
    4. │     ├─... %>% stringr::str_remove_all("[^A-Za-z0-9_]")
    5. │     ├─base::rev(...)
    6. │     ├─stringr::str_split(as.character(cohort_ref[[2]]$x), "\\.")
    7. │     │ └─stringr:::check_lengths(string, pattern)
    8. │     │   └─vctrs::vec_size_common(...)
    9. │     ├─base::as.character(cohort_ref[[2]]$x)
   10. │     └─vctrs:::as.character.vctrs_vctr(cohort_ref[[2]]$x)
   11. │       └─vctrs::vec_cast(x, character())
   12. ├─stringr::str_remove_all(., "[^A-Za-z0-9_]")
   13. │ └─stringr::str_replace_all(string, pattern, "")
   14. │   └─stringr:::check_lengths(string, pattern, replacement)
   15. │     └─vctrs::vec_size_common(...)
   16. └─vctrs (local) `<fn>`()
   17.   └─vctrs::vec_default_cast(...)
   18.     ├─base::withRestarts(...)
   19.     │ └─base (local) withOneRestart(expr, restarts[[1L]])
   20.     │   └─base (local) doWithOneRestart(return(expr), restart)
   21.     └─vctrs::stop_incompatible_cast(...)
   22.       └─vctrs::stop_incompatible_type(...)
   23.         └─vctrs:::stop_incompatible(...)
   24.           └─vctrs:::stop_vctrs(...)
   25.             └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = call)
  ── Error ('test-addDemographics.R:568:3'): age at cohort entry, missing year/month/day of birth ──
  <vctrs_error_cast/vctrs_error_incompatible_type/vctrs_error_incompatible/vctrs_error/rlang_error/error/condition>
  Error in `as.character(cohort_ref[[2]]$x)`: Can't convert `x` <dbplyr_table_ident> to <character>.
  Backtrace:
       ▆
    1. ├─PatientProfiles::mockPatientProfiles(...) at test-addDemographics.R:568:2
    2. │ └─CDMConnector::cdm_from_con(...)
    3. │   └─CDMConnector::new_generated_cohort_set(...)
    4. │     ├─... %>% stringr::str_remove_all("[^A-Za-z0-9_]")
    5. │     ├─base::rev(...)
    6. │     ├─stringr::str_split(as.character(cohort_ref[[2]]$x), "\\.")
    7. │     │ └─stringr:::check_lengths(string, pattern)
    8. │     │   └─vctrs::vec_size_common(...)
    9. │     ├─base::as.character(cohort_ref[[2]]$x)
   10. │     └─vctrs:::as.character.vctrs_vctr(cohort_ref[[2]]$x)
   11. │       └─vctrs::vec_cast(x, character())
   12. ├─stringr::str_remove_all(., "[^A-Za-z0-9_]")
   13. │ └─stringr::str_replace_all(string, pattern, "")
   14. │   └─stringr:::check_lengths(string, pattern, replacement)
   15. │     └─vctrs::vec_size_common(...)
   16. └─vctrs (local) `<fn>`()
   17.   └─vctrs::vec_default_cast(...)
   18.     ├─base::withRestarts(...)
   19.     │ └─base (local) withOneRestart(expr, restarts[[1L]])
   20.     │   └─base (local) doWithOneRestart(return(expr), restart)
   21.     └─vctrs::stop_incompatible_cast(...)
   22.       └─vctrs::stop_incompatible_type(...)
   23.         └─vctrs:::stop_incompatible(...)
   24.           └─vctrs:::stop_vctrs(...)
   25.             └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = call)
  ── Error ('test-addDemographics.R:608:3'): multiple cohortIds, check age at cohort end ──
  <vctrs_error_cast/vctrs_error_incompatible_type/vctrs_error_incompatible/vctrs_error/rlang_error/error/condition>
  Error in `as.character(cohort_ref[[2]]$x)`: Can't convert `x` <dbplyr_table_ident> to <character>.
  Backtrace:
       ▆
    1. ├─PatientProfiles::mockPatientProfiles(...) at test-addDemographics.R:608:2
    2. │ └─CDMConnector::cdm_from_con(...)
    3. │   └─CDMConnector::new_generated_cohort_set(...)
    4. │     ├─... %>% stringr::str_remove_all("[^A-Za-z0-9_]")
    5. │     ├─base::rev(...)
    6. │     ├─stringr::str_split(as.character(cohort_ref[[2]]$x), "\\.")
    7. │     │ └─stringr:::check_lengths(string, pattern)
    8. │     │   └─vctrs::vec_size_common(...)
    9. │     ├─base::as.character(cohort_ref[[2]]$x)
   10. │     └─vctrs:::as.character.vctrs_vctr(cohort_ref[[2]]$x)
   11. │       └─vctrs::vec_cast(x, character())
   12. ├─stringr::str_remove_all(., "[^A-Za-z0-9_]")
   13. │ └─stringr::str_replace_all(string, pattern, "")
   14. │   └─stringr:::check_lengths(string, pattern, replacement)
   15. │     └─vctrs::vec_size_common(...)
   16. └─vctrs (local) `<fn>`()
   17.   └─vctrs::vec_default_cast(...)
   18.     ├─base::withRestarts(...)
   19.     │ └─base (local) withOneRestart(expr, restarts[[1L]])
   20.     │   └─base (local) doWithOneRestart(return(expr), restart)
   21.     └─vctrs::stop_incompatible_cast(...)
   22.       └─vctrs::stop_incompatible_type(...)
   23.         └─vctrs:::stop_incompatible(...)
   24.           └─vctrs:::stop_vctrs(...)
   25.             └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = call)
  ── Error ('test-addDemographics.R:649:3'): age group checks ────────────────────
  <vctrs_error_cast/vctrs_error_incompatible_type/vctrs_error_incompatible/vctrs_error/rlang_error/error/condition>
  Error in `as.character(cohort_ref[[2]]$x)`: Can't convert `x` <dbplyr_table_ident> to <character>.
  Backtrace:
       ▆
    1. ├─PatientProfiles::mockPatientProfiles(...) at test-addDemographics.R:649:2
    2. │ └─CDMConnector::cdm_from_con(...)
    3. │   └─CDMConnector::new_generated_cohort_set(...)
    4. │     ├─... %>% stringr::str_remove_all("[^A-Za-z0-9_]")
    5. │     ├─base::rev(...)
    6. │     ├─stringr::str_split(as.character(cohort_ref[[2]]$x), "\\.")
    7. │     │ └─stringr:::check_lengths(string, pattern)
    8. │     │   └─vctrs::vec_size_common(...)
    9. │     ├─base::as.character(cohort_ref[[2]]$x)
   10. │     └─vctrs:::as.character.vctrs_vctr(cohort_ref[[2]]$x)
   11. │       └─vctrs::vec_cast(x, character())
   12. ├─stringr::str_remove_all(., "[^A-Za-z0-9_]")
   13. │ └─stringr::str_replace_all(string, pattern, "")
   14. │   └─stringr:::check_lengths(string, pattern, replacement)
   15. │     └─vctrs::vec_size_common(...)
   16. └─vctrs (local) `<fn>`()
   17.   └─vctrs::vec_default_cast(...)
   18.     ├─base::withRestarts(...)
   19.     │ └─base (local) withOneRestart(expr, restarts[[1L]])
   20.     │   └─base (local) doWithOneRestart(return(expr), restart)
   21.     └─vctrs::stop_incompatible_cast(...)
   22.       └─vctrs::stop_incompatible_type(...)
   23.         └─vctrs:::stop_incompatible(...)
   24.           └─vctrs:::stop_vctrs(...)
   25.             └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = call)
  ── Error ('test-addDemographics.R:746:3'): age variable names ──────────────────
  <vctrs_error_cast/vctrs_error_incompatible_type/vctrs_error_incompatible/vctrs_error/rlang_error/error/condition>
  Error in `as.character(cohort_ref[[2]]$x)`: Can't convert `x` <dbplyr_table_ident> to <character>.
  Backtrace:
       ▆
    1. ├─PatientProfiles::mockPatientProfiles(connectionDetails) at test-addDemographics.R:746:2
    2. │ └─CDMConnector::cdm_from_con(...)
    3. │   └─CDMConnector::new_generated_cohort_set(...)
    4. │     ├─... %>% stringr::str_remove_all("[^A-Za-z0-9_]")
    5. │     ├─base::rev(...)
    6. │     ├─stringr::str_split(as.character(cohort_ref[[2]]$x), "\\.")
    7. │     │ └─stringr:::check_lengths(string, pattern)
    8. │     │   └─vctrs::vec_size_common(...)
    9. │     ├─base::as.character(cohort_ref[[2]]$x)
   10. │     └─vctrs:::as.character.vctrs_vctr(cohort_ref[[2]]$x)
   11. │       └─vctrs::vec_cast(x, character())
   12. ├─stringr::str_remove_all(., "[^A-Za-z0-9_]")
   13. │ └─stringr::str_replace_all(string, pattern, "")
   14. │   └─stringr:::check_lengths(string, pattern, replacement)
   15. │     └─vctrs::vec_size_common(...)
   16. └─vctrs (local) `<fn>`()
   17.   └─vctrs::vec_default_cast(...)
   18.     ├─base::withRestarts(...)
   19.     │ └─base (local) withOneRestart(expr, restarts[[1L]])
   20.     │   └─base (local) doWithOneRestart(return(expr), restart)
   21.     └─vctrs::stop_incompatible_cast(...)
   22.       └─vctrs::stop_incompatible_type(...)
   23.         └─vctrs:::stop_incompatible(...)
   24.           └─vctrs:::stop_vctrs(...)
   25.             └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = call)
  ── Error ('test-addDemographics.R:764:3'): expected errors ─────────────────────
  <vctrs_error_cast/vctrs_error_incompatible_type/vctrs_error_incompatible/vctrs_error/rlang_error/error/condition>
  Error in `as.character(cohort_ref[[2]]$x)`: Can't convert `x` <dbplyr_table_ident> to <character>.
  Backtrace:
       ▆
    1. ├─PatientProfiles::mockPatientProfiles(...) at test-addDemographics.R:764:2
    2. │ └─CDMConnector::cdm_from_con(...)
    3. │   └─CDMConnector::new_generated_cohort_set(...)
    4. │     ├─... %>% stringr::str_remove_all("[^A-Za-z0-9_]")
    5. │     ├─base::rev(...)
    6. │     ├─stringr::str_split(as.character(cohort_ref[[2]]$x), "\\.")
    7. │     │ └─stringr:::check_lengths(string, pattern)
    8. │     │   └─vctrs::vec_size_common(...)
    9. │     ├─base::as.character(cohort_ref[[2]]$x)
   10. │     └─vctrs:::as.character.vctrs_vctr(cohort_ref[[2]]$x)
   11. │       └─vctrs::vec_cast(x, character())
   12. ├─stringr::str_remove_all(., "[^A-Za-z0-9_]")
   13. │ └─stringr::str_replace_all(string, pattern, "")
   14. │   └─stringr:::check_lengths(string, pattern, replacement)
   15. │     └─vctrs::vec_size_common(...)
   16. └─vctrs (local) `<fn>`()
   17.   └─vctrs::vec_default_cast(...)
   18.     ├─base::withRestarts(...)
   19.     │ └─base (local) withOneRestart(expr, restarts[[1L]])
   20.     │   └─base (local) doWithOneRestart(return(expr), restart)
   21.     └─vctrs::stop_incompatible_cast(...)
   22.       └─vctrs::stop_incompatible_type(...)
   23.         └─vctrs:::stop_incompatible(...)
   24.           └─vctrs:::stop_vctrs(...)
   25.             └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = call)
  ── Error ('test-addDemographics.R:864:3'): addCategories input ─────────────────
  <vctrs_error_cast/vctrs_error_incompatible_type/vctrs_error_incompatible/vctrs_error/rlang_error/error/condition>
  Error in `as.character(cohort_ref[[2]]$x)`: Can't convert `x` <dbplyr_table_ident> to <character>.
  Backtrace:
       ▆
    1. ├─PatientProfiles::mockPatientProfiles(...) at test-addDemographics.R:864:2
    2. │ └─CDMConnector::cdm_from_con(...)
    3. │   └─CDMConnector::new_generated_cohort_set(...)
    4. │     ├─... %>% stringr::str_remove_all("[^A-Za-z0-9_]")
    5. │     ├─base::rev(...)
    6. │     ├─stringr::str_split(as.character(cohort_ref[[2]]$x), "\\.")
    7. │     │ └─stringr:::check_lengths(string, pattern)
    8. │     │   └─vctrs::vec_size_common(...)
    9. │     ├─base::as.character(cohort_ref[[2]]$x)
   10. │     └─vctrs:::as.character.vctrs_vctr(cohort_ref[[2]]$x)
   11. │       └─vctrs::vec_cast(x, character())
   12. ├─stringr::str_remove_all(., "[^A-Za-z0-9_]")
   13. │ └─stringr::str_replace_all(string, pattern, "")
   14. │   └─stringr:::check_lengths(string, pattern, replacement)
   15. │     └─vctrs::vec_size_common(...)
   16. └─vctrs (local) `<fn>`()
   17.   └─vctrs::vec_default_cast(...)
   18.     ├─base::withRestarts(...)
   19.     │ └─base (local) withOneRestart(expr, restarts[[1L]])
   20.     │   └─base (local) doWithOneRestart(return(expr), restart)
   21.     └─vctrs::stop_incompatible_cast(...)
   22.       └─vctrs::stop_incompatible_type(...)
   23.         └─vctrs:::stop_incompatible(...)
   24.           └─vctrs:::stop_vctrs(...)
   25.             └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = call)
  ── Error ('test-addDemographics.R:984:3'): test if column exist, overwrite ─────
  <vctrs_error_cast/vctrs_error_incompatible_type/vctrs_error_incompatible/vctrs_error/rlang_error/error/condition>
  Error in `as.character(cohort_ref[[2]]$x)`: Can't convert `x` <dbplyr_table_ident> to <character>.
  Backtrace:
       ▆
    1. ├─PatientProfiles::mockPatientProfiles(...) at test-addDemographics.R:984:2
    2. │ └─CDMConnector::cdm_from_con(...)
    3. │   └─CDMConnector::new_generated_cohort_set(...)
    4. │     ├─... %>% stringr::str_remove_all("[^A-Za-z0-9_]")
    5. │     ├─base::rev(...)
    6. │     ├─stringr::str_split(as.character(cohort_ref[[2]]$x), "\\.")
    7. │     │ └─stringr:::check_lengths(string, pattern)
    8. │     │   └─vctrs::vec_size_common(...)
    9. │     ├─base::as.character(cohort_ref[[2]]$x)
   10. │     └─vctrs:::as.character.vctrs_vctr(cohort_ref[[2]]$x)
   11. │       └─vctrs::vec_cast(x, character())
   12. ├─stringr::str_remove_all(., "[^A-Za-z0-9_]")
   13. │ └─stringr::str_replace_all(string, pattern, "")
   14. │   └─stringr:::check_lengths(string, pattern, replacement)
   15. │     └─vctrs::vec_size_common(...)
   16. └─vctrs (local) `<fn>`()
   17.   └─vctrs::vec_default_cast(...)
   18.     ├─base::withRestarts(...)
   19.     │ └─base (local) withOneRestart(expr, restarts[[1L]])
   20.     │   └─base (local) doWithOneRestart(return(expr), restart)
   21.     └─vctrs::stop_incompatible_cast(...)
   22.       └─vctrs::stop_incompatible_type(...)
   23.         └─vctrs:::stop_incompatible(...)
   24.           └─vctrs:::stop_vctrs(...)
   25.             └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = call)
  ── Error ('test-addDemographics.R:1040:3'): date of birth ──────────────────────
  <vctrs_error_cast/vctrs_error_incompatible_type/vctrs_error_incompatible/vctrs_error/rlang_error/error/condition>
  Error in `as.character(cohort_ref[[2]]$x)`: Can't convert `x` <dbplyr_table_ident> to <character>.
  Backtrace:
       ▆
    1. ├─PatientProfiles::mockPatientProfiles(...) at test-addDemographics.R:1040:2
    2. │ └─CDMConnector::cdm_from_con(...)
    3. │   └─CDMConnector::new_generated_cohort_set(...)
    4. │     ├─... %>% stringr::str_remove_all("[^A-Za-z0-9_]")
    5. │     ├─base::rev(...)
    6. │     ├─stringr::str_split(as.character(cohort_ref[[2]]$x), "\\.")
    7. │     │ └─stringr:::check_lengths(string, pattern)
    8. │     │   └─vctrs::vec_size_common(...)
    9. │     ├─base::as.character(cohort_ref[[2]]$x)
   10. │     └─vctrs:::as.character.vctrs_vctr(cohort_ref[[2]]$x)
   11. │       └─vctrs::vec_cast(x, character())
   12. ├─stringr::str_remove_all(., "[^A-Za-z0-9_]")
   13. │ └─stringr::str_replace_all(string, pattern, "")
   14. │   └─stringr:::check_lengths(string, pattern, replacement)
   15. │     └─vctrs::vec_size_common(...)
   16. └─vctrs (local) `<fn>`()
   17.   └─vctrs::vec_default_cast(...)
   18.     ├─base::withRestarts(...)
   19.     │ └─base (local) withOneRestart(expr, restarts[[1L]])
   20.     │   └─base (local) doWithOneRestart(return(expr), restart)
   21.     └─vctrs::stop_incompatible_cast(...)
   22.       └─vctrs::stop_incompatible_type(...)
   23.         └─vctrs:::stop_incompatible(...)
   24.           └─vctrs:::stop_vctrs(...)
   25.             └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = call)
  ── Error ('test-addDemographics.R:1093:3'): missing levels ─────────────────────
  <vctrs_error_cast/vctrs_error_incompatible_type/vctrs_error_incompatible/vctrs_error/rlang_error/error/condition>
  Error in `as.character(cohort_ref[[2]]$x)`: Can't convert `x` <dbplyr_table_ident> to <character>.
  Backtrace:
       ▆
    1. ├─PatientProfiles::mockPatientProfiles(connectionDetails) at test-addDemographics.R:1093:2
    2. │ └─CDMConnector::cdm_from_con(...)
    3. │   └─CDMConnector::new_generated_cohort_set(...)
    4. │     ├─... %>% stringr::str_remove_all("[^A-Za-z0-9_]")
    5. │     ├─base::rev(...)
    6. │     ├─stringr::str_split(as.character(cohort_ref[[2]]$x), "\\.")
    7. │     │ └─stringr:::check_lengths(string, pattern)
    8. │     │   └─vctrs::vec_size_common(...)
    9. │     ├─base::as.character(cohort_ref[[2]]$x)
   10. │     └─vctrs:::as.character.vctrs_vctr(cohort_ref[[2]]$x)
   11. │       └─vctrs::vec_cast(x, character())
   12. ├─stringr::str_remove_all(., "[^A-Za-z0-9_]")
   13. │ └─stringr::str_replace_all(string, pattern, "")
   14. │   └─stringr:::check_lengths(string, pattern, replacement)
   15. │     └─vctrs::vec_size_common(...)
   16. └─vctrs (local) `<fn>`()
   17.   └─vctrs::vec_default_cast(...)
   18.     ├─base::withRestarts(...)
   19.     │ └─base (local) withOneRestart(expr, restarts[[1L]])
   20.     │   └─base (local) doWithOneRestart(return(expr), restart)
   21.     └─vctrs::stop_incompatible_cast(...)
   22.       └─vctrs::stop_incompatible_type(...)
   23.         └─vctrs:::stop_incompatible(...)
   24.           └─vctrs:::stop_vctrs(...)
   25.             └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = call)
  ── Error ('test-addPriorObservation.R:2:3'): check input length and type for each of the arguments ──
  <vctrs_error_cast/vctrs_error_incompatible_type/vctrs_error_incompatible/vctrs_error/rlang_error/error/condition>
  Error in `as.character(cohort_ref[[2]]$x)`: Can't convert `x` <dbplyr_table_ident> to <character>.
  Backtrace:
       ▆
    1. ├─PatientProfiles::mockPatientProfiles(...) at test-addPriorObservation.R:2:2
    2. │ └─CDMConnector::cdm_from_con(...)
    3. │   └─CDMConnector::new_generated_cohort_set(...)
    4. │     ├─... %>% stringr::str_remove_all("[^A-Za-z0-9_]")
    5. │     ├─base::rev(...)
    6. │     ├─stringr::str_split(as.character(cohort_ref[[2]]$x), "\\.")
    7. │     │ └─stringr:::check_lengths(string, pattern)
    8. │     │   └─vctrs::vec_size_common(...)
    9. │     ├─base::as.character(cohort_ref[[2]]$x)
   10. │     └─vctrs:::as.character.vctrs_vctr(cohort_ref[[2]]$x)
   11. │       └─vctrs::vec_cast(x, character())
   12. ├─stringr::str_remove_all(., "[^A-Za-z0-9_]")
   13. │ └─stringr::str_replace_all(string, pattern, "")
   14. │   └─stringr:::check_lengths(string, pattern, replacement)
   15. │     └─vctrs::vec_size_common(...)
   16. └─vctrs (local) `<fn>`()
   17.   └─vctrs::vec_default_cast(...)
   18.     ├─base::withRestarts(...)
   19.     │ └─base (local) withOneRestart(expr, restarts[[1L]])
   20.     │   └─base (local) doWithOneRestart(return(expr), restart)
   21.     └─vctrs::stop_incompatible_cast(...)
   22.       └─vctrs::stop_incompatible_type(...)
   23.         └─vctrs:::stop_incompatible(...)
   24.           └─vctrs:::stop_vctrs(...)
   25.             └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = call)
  ── Error ('test-addPriorObservation.R:20:3'): check condition_occurrence and cohort1 work ──
  <vctrs_error_cast/vctrs_error_incompatible_type/vctrs_error_incompatible/vctrs_error/rlang_error/error/condition>
  Error in `as.character(cohort_ref[[2]]$x)`: Can't convert `x` <dbplyr_table_ident> to <character>.
  Backtrace:
       ▆
    1. ├─PatientProfiles::mockPatientProfiles(...) at test-addPriorObservation.R:20:2
    2. │ └─CDMConnector::cdm_from_con(...)
    3. │   └─CDMConnector::new_generated_cohort_set(...)
    4. │     ├─... %>% stringr::str_remove_all("[^A-Za-z0-9_]")
    5. │     ├─base::rev(...)
    6. │     ├─stringr::str_split(as.character(cohort_ref[[2]]$x), "\\.")
    7. │     │ └─stringr:::check_lengths(string, pattern)
    8. │     │   └─vctrs::vec_size_common(...)
    9. │     ├─base::as.character(cohort_ref[[2]]$x)
   10. │     └─vctrs:::as.character.vctrs_vctr(cohort_ref[[2]]$x)
   11. │       └─vctrs::vec_cast(x, character())
   12. ├─stringr::str_remove_all(., "[^A-Za-z0-9_]")
   13. │ └─stringr::str_replace_all(string, pattern, "")
   14. │   └─stringr:::check_lengths(string, pattern, replacement)
   15. │     └─vctrs::vec_size_common(...)
   16. └─vctrs (local) `<fn>`()
   17.   └─vctrs::vec_default_cast(...)
   18.     ├─base::withRestarts(...)
   19.     │ └─base (local) withOneRestart(expr, restarts[[1L]])
   20.     │   └─base (local) doWithOneRestart(return(expr), restart)
   21.     └─vctrs::stop_incompatible_cast(...)
   22.       └─vctrs::stop_incompatible_type(...)
   23.         └─vctrs:::stop_incompatible(...)
   24.           └─vctrs:::stop_vctrs(...)
   25.             └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = call)
  ── Error ('test-addPriorObservation.R:68:3'): check working example with cohort1 ──
  <vctrs_error_cast/vctrs_error_incompatible_type/vctrs_error_incompatible/vctrs_error/rlang_error/error/condition>
  Error in `as.character(cohort_ref[[2]]$x)`: Can't convert `x` <dbplyr_table_ident> to <character>.
  Backtrace:
       ▆
    1. ├─PatientProfiles::mockPatientProfiles(...) at test-addPriorObservation.R:68:2
    2. │ └─CDMConnector::cdm_from_con(...)
    3. │   └─CDMConnector::new_generated_cohort_set(...)
    4. │     ├─... %>% stringr::str_remove_all("[^A-Za-z0-9_]")
    5. │     ├─base::rev(...)
    6. │     ├─stringr::str_split(as.character(cohort_ref[[2]]$x), "\\.")
    7. │     │ └─stringr:::check_lengths(string, pattern)
    8. │     │   └─vctrs::vec_size_common(...)
    9. │     ├─base::as.character(cohort_ref[[2]]$x)
   10. │     └─vctrs:::as.character.vctrs_vctr(cohort_ref[[2]]$x)
   11. │       └─vctrs::vec_cast(x, character())
   12. ├─stringr::str_remove_all(., "[^A-Za-z0-9_]")
   13. │ └─stringr::str_replace_all(string, pattern, "")
   14. │   └─stringr:::check_lengths(string, pattern, replacement)
   15. │     └─vctrs::vec_size_common(...)
   16. └─vctrs (local) `<fn>`()
   17.   └─vctrs::vec_default_cast(...)
   18.     ├─base::withRestarts(...)
   19.     │ └─base (local) withOneRestart(expr, restarts[[1L]])
   20.     │   └─base (local) doWithOneRestart(return(expr), restart)
   21.     └─vctrs::stop_incompatible_cast(...)
   22.       └─vctrs::stop_incompatible_type(...)
   23.         └─vctrs:::stop_incompatible(...)
   24.           └─vctrs:::stop_vctrs(...)
   25.             └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = call)
  ── Error ('test-addPriorObservation.R:116:3'): check working example with condition_occurrence ──
  <vctrs_error_cast/vctrs_error_incompatible_type/vctrs_error_incompatible/vctrs_error/rlang_error/error/condition>
  Error in `as.character(cohort_ref[[2]]$x)`: Can't convert `x` <dbplyr_table_ident> to <character>.
  Backtrace:
       ▆
    1. ├─PatientProfiles::mockPatientProfiles(...) at test-addPriorObservation.R:116:2
    2. │ └─CDMConnector::cdm_from_con(...)
    3. │   └─CDMConnector::new_generated_cohort_set(...)
    4. │     ├─... %>% stringr::str_remove_all("[^A-Za-z0-9_]")
    5. │     ├─base::rev(...)
    6. │     ├─stringr::str_split(as.character(cohort_ref[[2]]$x), "\\.")
    7. │     │ └─stringr:::check_lengths(string, pattern)
    8. │     │   └─vctrs::vec_size_common(...)
    9. │     ├─base::as.character(cohort_ref[[2]]$x)
   10. │     └─vctrs:::as.character.vctrs_vctr(cohort_ref[[2]]$x)
   11. │       └─vctrs::vec_cast(x, character())
   12. ├─stringr::str_remove_all(., "[^A-Za-z0-9_]")
   13. │ └─stringr::str_replace_all(string, pattern, "")
   14. │   └─stringr:::check_lengths(string, pattern, replacement)
   15. │     └─vctrs::vec_size_common(...)
   16. └─vctrs (local) `<fn>`()
   17.   └─vctrs::vec_default_cast(...)
   18.     ├─base::withRestarts(...)
   19.     │ └─base (local) withOneRestart(expr, restarts[[1L]])
   20.     │   └─base (local) doWithOneRestart(return(expr), restart)
   21.     └─vctrs::stop_incompatible_cast(...)
   22.       └─vctrs::stop_incompatible_type(...)
   23.         └─vctrs:::stop_incompatible(...)
   24.           └─vctrs:::stop_vctrs(...)
   25.             └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = call)
  ── Error ('test-addPriorObservation.R:165:3'): different name ──────────────────
  <vctrs_error_cast/vctrs_error_incompatible_type/vctrs_error_incompatible/vctrs_error/rlang_error/error/condition>
  Error in `as.character(cohort_ref[[2]]$x)`: Can't convert `x` <dbplyr_table_ident> to <character>.
  Backtrace:
       ▆
    1. ├─PatientProfiles::mockPatientProfiles(...) at test-addPriorObservation.R:165:2
    2. │ └─CDMConnector::cdm_from_con(...)
    3. │   └─CDMConnector::new_generated_cohort_set(...)
    4. │     ├─... %>% stringr::str_remove_all("[^A-Za-z0-9_]")
    5. │     ├─base::rev(...)
    6. │     ├─stringr::str_split(as.character(cohort_ref[[2]]$x), "\\.")
    7. │     │ └─stringr:::check_lengths(string, pattern)
    8. │     │   └─vctrs::vec_size_common(...)
    9. │     ├─base::as.character(cohort_ref[[2]]$x)
   10. │     └─vctrs:::as.character.vctrs_vctr(cohort_ref[[2]]$x)
   11. │       └─vctrs::vec_cast(x, character())
   12. ├─stringr::str_remove_all(., "[^A-Za-z0-9_]")
   13. │ └─stringr::str_replace_all(string, pattern, "")
   14. │   └─stringr:::check_lengths(string, pattern, replacement)
   15. │     └─vctrs::vec_size_common(...)
   16. └─vctrs (local) `<fn>`()
   17.   └─vctrs::vec_default_cast(...)
   18.     ├─base::withRestarts(...)
   19.     │ └─base (local) withOneRestart(expr, restarts[[1L]])
   20.     │   └─base (local) doWithOneRestart(return(expr), restart)
   21.     └─vctrs::stop_incompatible_cast(...)
   22.       └─vctrs::stop_incompatible_type(...)
   23.         └─vctrs:::stop_incompatible(...)
   24.           └─vctrs:::stop_vctrs(...)
   25.             └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = call)
  ── Error ('test-addPriorObservation.R:210:3'): priorHistory and future_observation - outside of observation period ──
  <vctrs_error_cast/vctrs_error_incompatible_type/vctrs_error_incompatible/vctrs_error/rlang_error/error/condition>
  Error in `as.character(cohort_ref[[2]]$x)`: Can't convert `x` <dbplyr_table_ident> to <character>.
  Backtrace:
       ▆
    1. ├─PatientProfiles::mockPatientProfiles(...) at test-addPriorObservation.R:210:2
    2. │ └─CDMConnector::cdm_from_con(...)
    3. │   └─CDMConnector::new_generated_cohort_set(...)
    4. │     ├─... %>% stringr::str_remove_all("[^A-Za-z0-9_]")
    5. │     ├─base::rev(...)
    6. │     ├─stringr::str_split(as.character(cohort_ref[[2]]$x), "\\.")
    7. │     │ └─stringr:::check_lengths(string, pattern)
    8. │     │   └─vctrs::vec_size_common(...)
    9. │     ├─base::as.character(cohort_ref[[2]]$x)
   10. │     └─vctrs:::as.character.vctrs_vctr(cohort_ref[[2]]$x)
   11. │       └─vctrs::vec_cast(x, character())
   12. ├─stringr::str_remove_all(., "[^A-Za-z0-9_]")
   13. │ └─stringr::str_replace_all(string, pattern, "")
   14. │   └─stringr:::check_lengths(string, pattern, replacement)
   15. │     └─vctrs::vec_size_common(...)
   16. └─vctrs (local) `<fn>`()
   17.   └─vctrs::vec_default_cast(...)
   18.     ├─base::withRestarts(...)
   19.     │ └─base (local) withOneRestart(expr, restarts[[1L]])
   20.     │   └─base (local) doWithOneRestart(return(expr), restart)
   21.     └─vctrs::stop_incompatible_cast(...)
   22.       └─vctrs::stop_incompatible_type(...)
   23.         └─vctrs:::stop_incompatible(...)
   24.           └─vctrs:::stop_vctrs(...)
   25.             └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = call)
  ── Error ('test-addPriorObservation.R:256:3'): multiple observation periods ────
  <vctrs_error_cast/vctrs_error_incompatible_type/vctrs_error_incompatible/vctrs_error/rlang_error/error/condition>
  Error in `as.character(cohort_ref[[2]]$x)`: Can't convert `x` <dbplyr_table_ident> to <character>.
  Backtrace:
       ▆
    1. ├─PatientProfiles::mockPatientProfiles(...) at test-addPriorObservation.R:256:2
    2. │ └─CDMConnector::cdm_from_con(...)
    3. │   └─CDMConnector::new_generated_cohort_set(...)
    4. │     ├─... %>% stringr::str_remove_all("[^A-Za-z0-9_]")
    5. │     ├─base::rev(...)
    6. │     ├─stringr::str_split(as.character(cohort_ref[[2]]$x), "\\.")
    7. │     │ └─stringr:::check_lengths(string, pattern)
    8. │     │   └─vctrs::vec_size_common(...)
    9. │     ├─base::as.character(cohort_ref[[2]]$x)
   10. │     └─vctrs:::as.character.vctrs_vctr(cohort_ref[[2]]$x)
   11. │       └─vctrs::vec_cast(x, character())
   12. ├─stringr::str_remove_all(., "[^A-Za-z0-9_]")
   13. │ └─stringr::str_replace_all(string, pattern, "")
   14. │   └─stringr:::check_lengths(string, pattern, replacement)
   15. │     └─vctrs::vec_size_common(...)
   16. └─vctrs (local) `<fn>`()
   17.   └─vctrs::vec_default_cast(...)
   18.     ├─base::withRestarts(...)
   19.     │ └─base (local) withOneRestart(expr, restarts[[1L]])
   20.     │   └─base (local) doWithOneRestart(return(expr), restart)
   21.     └─vctrs::stop_incompatible_cast(...)
   22.       └─vctrs::stop_incompatible_type(...)
   23.         └─vctrs:::stop_incompatible(...)
   24.           └─vctrs:::stop_vctrs(...)
   25.             └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = call)
  ── Error ('test-addSex.R:2:3'): addSex, check imput length and type ────────────
  <vctrs_error_cast/vctrs_error_incompatible_type/vctrs_error_incompatible/vctrs_error/rlang_error/error/condition>
  Error in `as.character(cohort_ref[[2]]$x)`: Can't convert `x` <dbplyr_table_ident> to <character>.
  Backtrace:
       ▆
    1. ├─PatientProfiles::mockPatientProfiles(...) at test-addSex.R:2:2
    2. │ └─CDMConnector::cdm_from_con(...)
    3. │   └─CDMConnector::new_generated_cohort_set(...)
    4. │     ├─... %>% stringr::str_remove_all("[^A-Za-z0-9_]")
    5. │     ├─base::rev(...)
    6. │     ├─stringr::str_split(as.character(cohort_ref[[2]]$x), "\\.")
    7. │     │ └─stringr:::check_lengths(string, pattern)
    8. │     │   └─vctrs::vec_size_common(...)
    9. │     ├─base::as.character(cohort_ref[[2]]$x)
   10. │     └─vctrs:::as.character.vctrs_vctr(cohort_ref[[2]]$x)
   11. │       └─vctrs::vec_cast(x, character())
   12. ├─stringr::str_remove_all(., "[^A-Za-z0-9_]")
   13. │ └─stringr::str_replace_all(string, pattern, "")
   14. │   └─stringr:::check_lengths(string, pattern, replacement)
   15. │     └─vctrs::vec_size_common(...)
   16. └─vctrs (local) `<fn>`()
   17.   └─vctrs::vec_default_cast(...)
   18.     ├─base::withRestarts(...)
   19.     │ └─base (local) withOneRestart(expr, restarts[[1L]])
   20.     │   └─base (local) doWithOneRestart(return(expr), restart)
   21.     └─vctrs::stop_incompatible_cast(...)
   22.       └─vctrs::stop_incompatible_type(...)
   23.         └─vctrs:::stop_incompatible(...)
   24.           └─vctrs:::stop_vctrs(...)
   25.             └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = call)
  ── Error ('test-addSex.R:12:3'): addSex, works in both cohort and condition tables ──
  <vctrs_error_cast/vctrs_error_incompatible_type/vctrs_error_incompatible/vctrs_error/rlang_error/error/condition>
  Error in `as.character(cohort_ref[[2]]$x)`: Can't convert `x` <dbplyr_table_ident> to <character>.
  Backtrace:
       ▆
    1. ├─PatientProfiles::mockPatientProfiles(...) at test-addSex.R:12:2
    2. │ └─CDMConnector::cdm_from_con(...)
    3. │   └─CDMConnector::new_generated_cohort_set(...)
    4. │     ├─... %>% stringr::str_remove_all("[^A-Za-z0-9_]")
    5. │     ├─base::rev(...)
    6. │     ├─stringr::str_split(as.character(cohort_ref[[2]]$x), "\\.")
    7. │     │ └─stringr:::check_lengths(string, pattern)
    8. │     │   └─vctrs::vec_size_common(...)
    9. │     ├─base::as.character(cohort_ref[[2]]$x)
   10. │     └─vctrs:::as.character.vctrs_vctr(cohort_ref[[2]]$x)
   11. │       └─vctrs::vec_cast(x, character())
   12. ├─stringr::str_remove_all(., "[^A-Za-z0-9_]")
   13. │ └─stringr::str_replace_all(string, pattern, "")
   14. │   └─stringr:::check_lengths(string, pattern, replacement)
   15. │     └─vctrs::vec_size_common(...)
   16. └─vctrs (local) `<fn>`()
   17.   └─vctrs::vec_default_cast(...)
   18.     ├─base::withRestarts(...)
   19.     │ └─base (local) withOneRestart(expr, restarts[[1L]])
   20.     │   └─base (local) doWithOneRestart(return(expr), restart)
   21.     └─vctrs::stop_incompatible_cast(...)
   22.       └─vctrs::stop_incompatible_type(...)
   23.         └─vctrs:::stop_incompatible(...)
   24.           └─vctrs:::stop_vctrs(...)
   25.             └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = call)
  ── Error ('test-addSex.R:22:3'): addSex, desired result for all parameters ─────
  <vctrs_error_cast/vctrs_error_incompatible_type/vctrs_error_incompatible/vctrs_error/rlang_error/error/condition>
  Error in `as.character(cohort_ref[[2]]$x)`: Can't convert `x` <dbplyr_table_ident> to <character>.
  Backtrace:
       ▆
    1. ├─PatientProfiles::mockPatientProfiles(...) at test-addSex.R:22:2
    2. │ └─CDMConnector::cdm_from_con(...)
    3. │   └─CDMConnector::new_generated_cohort_set(...)
    4. │     ├─... %>% stringr::str_remove_all("[^A-Za-z0-9_]")
    5. │     ├─base::rev(...)
    6. │     ├─stringr::str_split(as.character(cohort_ref[[2]]$x), "\\.")
    7. │     │ └─stringr:::check_lengths(string, pattern)
    8. │     │   └─vctrs::vec_size_common(...)
    9. │     ├─base::as.character(cohort_ref[[2]]$x)
   10. │     └─vctrs:::as.character.vctrs_vctr(cohort_ref[[2]]$x)
   11. │       └─vctrs::vec_cast(x, character())
   12. ├─stringr::str_remove_all(., "[^A-Za-z0-9_]")
   13. │ └─stringr::str_replace_all(string, pattern, "")
   14. │   └─stringr:::check_lengths(string, pattern, replacement)
   15. │     └─vctrs::vec_size_common(...)
   16. └─vctrs (local) `<fn>`()
   17.   └─vctrs::vec_default_cast(...)
   18.     ├─base::withRestarts(...)
   19.     │ └─base (local) withOneRestart(expr, restarts[[1L]])
   20.     │   └─base (local) doWithOneRestart(return(expr), restart)
   21.     └─vctrs::stop_incompatible_cast(...)
   22.       └─vctrs::stop_incompatible_type(...)
   23.         └─vctrs:::stop_incompatible(...)
   24.           └─vctrs:::stop_vctrs(...)
   25.             └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = call)
  ── Error ('test-addSex.R:33:3'): different names ───────────────────────────────
  <vctrs_error_cast/vctrs_error_incompatible_type/vctrs_error_incompatible/vctrs_error/rlang_error/error/condition>
  Error in `as.character(cohort_ref[[2]]$x)`: Can't convert `x` <dbplyr_table_ident> to <character>.
  Backtrace:
       ▆
    1. ├─PatientProfiles::mockPatientProfiles(...) at test-addSex.R:33:2
    2. │ └─CDMConnector::cdm_from_con(...)
    3. │   └─CDMConnector::new_generated_cohort_set(...)
    4. │     ├─... %>% stringr::str_remove_all("[^A-Za-z0-9_]")
    5. │     ├─base::rev(...)
    6. │     ├─stringr::str_split(as.character(cohort_ref[[2]]$x), "\\.")
    7. │     │ └─stringr:::check_lengths(string, pattern)
    8. │     │   └─vctrs::vec_size_common(...)
    9. │     ├─base::as.character(cohort_ref[[2]]$x)
   10. │     └─vctrs:::as.character.vctrs_vctr(cohort_ref[[2]]$x)
   11. │       └─vctrs::vec_cast(x, character())
   12. ├─stringr::str_remove_all(., "[^A-Za-z0-9_]")
   13. │ └─stringr::str_replace_all(string, pattern, "")
   14. │   └─stringr:::check_lengths(string, pattern, replacement)
   15. │     └─vctrs::vec_size_common(...)
   16. └─vctrs (local) `<fn>`()
   17.   └─vctrs::vec_default_cast(...)
   18.     ├─base::withRestarts(...)
   19.     │ └─base (local) withOneRestart(expr, restarts[[1L]])
   20.     │   └─base (local) doWithOneRestart(return(expr), restart)
   21.     └─vctrs::stop_incompatible_cast(...)
   22.       └─vctrs::stop_incompatible_type(...)
   23.         └─vctrs:::stop_incompatible(...)
   24.           └─vctrs:::stop_vctrs(...)
   25.             └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = call)
  ── Error ('test-addIntersect.R:53:3'): working examples ────────────────────────
  <vctrs_error_cast/vctrs_error_incompatible_type/vctrs_error_incompatible/vctrs_error/rlang_error/error/condition>
  Error in `as.character(cohort_ref[[2]]$x)`: Can't convert `x` <dbplyr_table_ident> to <character>.
  Backtrace:
       ▆
    1. ├─PatientProfiles::mockPatientProfiles(...) at test-addIntersect.R:53:2
    2. │ └─CDMConnector::cdm_from_con(...)
    3. │   └─CDMConnector::new_generated_cohort_set(...)
    4. │     ├─... %>% stringr::str_remove_all("[^A-Za-z0-9_]")
    5. │     ├─base::rev(...)
    6. │     ├─stringr::str_split(as.character(cohort_ref[[2]]$x), "\\.")
    7. │     │ └─stringr:::check_lengths(string, pattern)
    8. │     │   └─vctrs::vec_size_common(...)
    9. │     ├─base::as.character(cohort_ref[[2]]$x)
   10. │     └─vctrs:::as.character.vctrs_vctr(cohort_ref[[2]]$x)
   11. │       └─vctrs::vec_cast(x, character())
   12. ├─stringr::str_remove_all(., "[^A-Za-z0-9_]")
   13. │ └─stringr::str_replace_all(string, pattern, "")
   14. │   └─stringr:::check_lengths(string, pattern, replacement)
   15. │     └─vctrs::vec_size_common(...)
   16. └─vctrs (local) `<fn>`()
   17.   └─vctrs::vec_default_cast(...)
   18.     ├─base::withRestarts(...)
   19.     │ └─base (local) withOneRestart(expr, restarts[[1L]])
   20.     │   └─base (local) doWithOneRestart(return(expr), restart)
   21.     └─vctrs::stop_incompatible_cast(...)
   22.       └─vctrs::stop_incompatible_type(...)
   23.         └─vctrs:::stop_incompatible(...)
   24.           └─vctrs:::stop_vctrs(...)
   25.             └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = call)
  ── Error ('test-addIntersect.R:244:3'): working examples with cohort_end_date ──
  <vctrs_error_cast/vctrs_error_incompatible_type/vctrs_error_incompatible/vctrs_error/rlang_error/error/condition>
  Error in `as.character(cohort_ref[[2]]$x)`: Can't convert `x` <dbplyr_table_ident> to <character>.
  Backtrace:
       ▆
    1. ├─PatientProfiles::mockPatientProfiles(...) at test-addIntersect.R:244:2
    2. │ └─CDMConnector::cdm_from_con(...)
    3. │   └─CDMConnector::new_generated_cohort_set(...)
    4. │     ├─... %>% stringr::str_remove_all("[^A-Za-z0-9_]")
    5. │     ├─base::rev(...)
    6. │     ├─stringr::str_split(as.character(cohort_ref[[2]]$x), "\\.")
    7. │     │ └─stringr:::check_lengths(string, pattern)
    8. │     │   └─vctrs::vec_size_common(...)
    9. │     ├─base::as.character(cohort_ref[[2]]$x)
   10. │     └─vctrs:::as.character.vctrs_vctr(cohort_ref[[2]]$x)
   11. │       └─vctrs::vec_cast(x, character())
   12. ├─stringr::str_remove_all(., "[^A-Za-z0-9_]")
   13. │ └─stringr::str_replace_all(string, pattern, "")
   14. │   └─stringr:::check_lengths(string, pattern, replacement)
   15. │     └─vctrs::vec_size_common(...)
   16. └─vctrs (local) `<fn>`()
   17.   └─vctrs::vec_default_cast(...)
   18.     ├─base::withRestarts(...)
   19.     │ └─base (local) withOneRestart(expr, restarts[[1L]])
   20.     │   └─base (local) doWithOneRestart(return(expr), restart)
   21.     └─vctrs::stop_incompatible_cast(...)
   22.       └─vctrs::stop_incompatible_type(...)
   23.         └─vctrs:::stop_incompatible(...)
   24.           └─vctrs:::stop_vctrs(...)
   25.             └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = call)
  ── Error ('test-addIntersect.R:309:3'): working examples with extra column ─────
  <vctrs_error_cast/vctrs_error_incompatible_type/vctrs_error_incompatible/vctrs_error/rlang_error/error/condition>
  Error in `as.character(cohort_ref[[2]]$x)`: Can't convert `x` <dbplyr_table_ident> to <character>.
  Backtrace:
       ▆
    1. ├─PatientProfiles::mockPatientProfiles(...) at test-addIntersect.R:309:2
    2. │ └─CDMConnector::cdm_from_con(...)
    3. │   └─CDMConnector::new_generated_cohort_set(...)
    4. │     ├─... %>% stringr::str_remove_all("[^A-Za-z0-9_]")
    5. │     ├─base::rev(...)
    6. │     ├─stringr::str_split(as.character(cohort_ref[[2]]$x), "\\.")
    7. │     │ └─stringr:::check_lengths(string, pattern)
    8. │     │   └─vctrs::vec_size_common(...)
    9. │     ├─base::as.character(cohort_ref[[2]]$x)
   10. │     └─vctrs:::as.character.vctrs_vctr(cohort_ref[[2]]$x)
   11. │       └─vctrs::vec_cast(x, character())
   12. ├─stringr::str_remove_all(., "[^A-Za-z0-9_]")
   13. │ └─stringr::str_replace_all(string, pattern, "")
   14. │   └─stringr:::check_lengths(string, pattern, replacement)
   15. │     └─vctrs::vec_size_common(...)
   16. └─vctrs (local) `<fn>`()
   17.   └─vctrs::vec_default_cast(...)
   18.     ├─base::withRestarts(...)
   19.     │ └─base (local) withOneRestart(expr, restarts[[1L]])
   20.     │   └─base (local) doWithOneRestart(return(expr), restart)
   21.     └─vctrs::stop_incompatible_cast(...)
   22.       └─vctrs::stop_incompatible_type(...)
   23.         └─vctrs:::stop_incompatible(...)
   24.           └─vctrs:::stop_vctrs(...)
   25.             └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = call)
  ── Error ('test-addIntersect.R:441:3'): working examples with multiple cohort Ids ──
  <vctrs_error_cast/vctrs_error_incompatible_type/vctrs_error_incompatible/vctrs_error/rlang_error/error/condition>
  Error in `as.character(cohort_ref[[2]]$x)`: Can't convert `x` <dbplyr_table_ident> to <character>.
  Backtrace:
       ▆
    1. ├─PatientProfiles::mockPatientProfiles(...) at test-addIntersect.R:441:2
    2. │ └─CDMConnector::cdm_from_con(...)
    3. │   └─CDMConnector::new_generated_cohort_set(...)
    4. │     ├─... %>% stringr::str_remove_all("[^A-Za-z0-9_]")
    5. │     ├─base::rev(...)
    6. │     ├─stringr::str_split(as.character(cohort_ref[[2]]$x), "\\.")
    7. │     │ └─stringr:::check_lengths(string, pattern)
    8. │     │   └─vctrs::vec_size_common(...)
    9. │     ├─base::as.character(cohort_ref[[2]]$x)
   10. │     └─vctrs:::as.character.vctrs_vctr(cohort_ref[[2]]$x)
   11. │       └─vctrs::vec_cast(x, character())
   12. ├─stringr::str_remove_all(., "[^A-Za-z0-9_]")
   13. │ └─stringr::str_replace_all(string, pattern, "")
   14. │   └─stringr:::check_lengths(string, pattern, replacement)
   15. │     └─vctrs::vec_size_common(...)
   16. └─vctrs (local) `<fn>`()
   17.   └─vctrs::vec_default_cast(...)
   18.     ├─base::withRestarts(...)
   19.     │ └─base (local) withOneRestart(expr, restarts[[1L]])
   20.     │   └─base (local) doWithOneRestart(return(expr), restart)
   21.     └─vctrs::stop_incompatible_cast(...)
   22.       └─vctrs::stop_incompatible_type(...)
   23.         └─vctrs:::stop_incompatible(...)
   24.           └─vctrs:::stop_vctrs(...)
   25.             └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = call)
  ── Error ('test-addIntersect.R:537:3'): working examples calculating as incidence target cohort ──
  <vctrs_error_cast/vctrs_error_incompatible_type/vctrs_error_incompatible/vctrs_error/rlang_error/error/condition>
  Error in `as.character(cohort_ref[[2]]$x)`: Can't convert `x` <dbplyr_table_ident> to <character>.
  Backtrace:
       ▆
    1. ├─PatientProfiles::mockPatientProfiles(...) at test-addIntersect.R:537:2
    2. │ └─CDMConnector::cdm_from_con(...)
    3. │   └─CDMConnector::new_generated_cohort_set(...)
    4. │     ├─... %>% stringr::str_remove_all("[^A-Za-z0-9_]")
    5. │     ├─base::rev(...)
    6. │     ├─stringr::str_split(as.character(cohort_ref[[2]]$x), "\\.")
    7. │     │ └─stringr:::check_lengths(string, pattern)
    8. │     │   └─vctrs::vec_size_common(...)
    9. │     ├─base::as.character(cohort_ref[[2]]$x)
   10. │     └─vctrs:::as.character.vctrs_vctr(cohort_ref[[2]]$x)
   11. │       └─vctrs::vec_cast(x, character())
   12. ├─stringr::str_remove_all(., "[^A-Za-z0-9_]")
   13. │ └─stringr::str_replace_all(string, pattern, "")
   14. │   └─stringr:::check_lengths(string, pattern, replacement)
   15. │     └─vctrs::vec_size_common(...)
   16. └─vctrs (local) `<fn>`()
   17.   └─vctrs::vec_default_cast(...)
   18.     ├─base::withRestarts(...)
   19.     │ └─base (local) withOneRestart(expr, restarts[[1L]])
   20.     │   └─base (local) doWithOneRestart(return(expr), restart)
   21.     └─vctrs::stop_incompatible_cast(...)
   22.       └─vctrs::stop_incompatible_type(...)
   23.         └─vctrs:::stop_incompatible(...)
   24.           └─vctrs:::stop_vctrs(...)
   25.             └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = call)
  ── Error ('test-addIntersect.R:611:3'): working examples with more than one window ──
  <vctrs_error_cast/vctrs_error_incompatible_type/vctrs_error_incompatible/vctrs_error/rlang_error/error/condition>
  Error in `as.character(cohort_ref[[2]]$x)`: Can't convert `x` <dbplyr_table_ident> to <character>.
  Backtrace:
       ▆
    1. ├─PatientProfiles::mockPatientProfiles(...) at test-addIntersect.R:611:2
    2. │ └─CDMConnector::cdm_from_con(...)
    3. │   └─CDMConnector::new_generated_cohort_set(...)
    4. │     ├─... %>% stringr::str_remove_all("[^A-Za-z0-9_]")
    5. │     ├─base::rev(...)
    6. │     ├─stringr::str_split(as.character(cohort_ref[[2]]$x), "\\.")
    7. │     │ └─stringr:::check_lengths(string, pattern)
    8. │     │   └─vctrs::vec_size_common(...)
    9. │     ├─base::as.character(cohort_ref[[2]]$x)
   10. │     └─vctrs:::as.character.vctrs_vctr(cohort_ref[[2]]$x)
   11. │       └─vctrs::vec_cast(x, character())
   12. ├─stringr::str_remove_all(., "[^A-Za-z0-9_]")
   13. │ └─stringr::str_replace_all(string, pattern, "")
   14. │   └─stringr:::check_lengths(string, pattern, replacement)
   15. │     └─vctrs::vec_size_common(...)
   16. └─vctrs (local) `<fn>`()
   17.   └─vctrs::vec_default_cast(...)
   18.     ├─base::withRestarts(...)
   19.     │ └─base (local) withOneRestart(expr, restarts[[1L]])
   20.     │   └─base (local) doWithOneRestart(return(expr), restart)
   21.     └─vctrs::stop_incompatible_cast(...)
   22.       └─vctrs::stop_incompatible_type(...)
   23.         └─vctrs:::stop_incompatible(...)
   24.           └─vctrs:::stop_vctrs(...)
   25.             └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = call)
  ── Error ('test-addIntersect.R:692:3'): working examples with tables, not cohorts ──
  <vctrs_error_cast/vctrs_error_incompatible_type/vctrs_error_incompatible/vctrs_error/rlang_error/error/condition>
  Error in `as.character(cohort_ref[[2]]$x)`: Can't convert `x` <dbplyr_table_ident> to <character>.
  Backtrace:
       ▆
    1. ├─PatientProfiles::mockPatientProfiles(...) at test-addIntersect.R:692:2
    2. │ └─CDMConnector::cdm_from_con(...)
    3. │   └─CDMConnector::new_generated_cohort_set(...)
    4. │     ├─... %>% stringr::str_remove_all("[^A-Za-z0-9_]")
    5. │     ├─base::rev(...)
    6. │     ├─stringr::str_split(as.character(cohort_ref[[2]]$x), "\\.")
    7. │     │ └─stringr:::check_lengths(string, pattern)
    8. │     │   └─vctrs::vec_size_common(...)
    9. │     ├─base::as.character(cohort_ref[[2]]$x)
   10. │     └─vctrs:::as.character.vctrs_vctr(cohort_ref[[2]]$x)
   11. │       └─vctrs::vec_cast(x, character())
   12. ├─stringr::str_remove_all(., "[^A-Za-z0-9_]")
   13. │ └─stringr::str_replace_all(string, pattern, "")
   14. │   └─stringr:::check_lengths(string, pattern, replacement)
   15. │     └─vctrs::vec_size_common(...)
   16. └─vctrs (local) `<fn>`()
   17.   └─vctrs::vec_default_cast(...)
   18.     ├─base::withRestarts(...)
   19.     │ └─base (local) withOneRestart(expr, restarts[[1L]])
   20.     │   └─base (local) doWithOneRestart(return(expr), restart)
   21.     └─vctrs::stop_incompatible_cast(...)
   22.       └─vctrs::stop_incompatible_type(...)
   23.         └─vctrs:::stop_incompatible(...)
   24.           └─vctrs:::stop_vctrs(...)
   25.             └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = call)
  ── Error ('test-addIntersect.R:823:3'): check input length and type for each of the arguments ──
  <vctrs_error_cast/vctrs_error_incompatible_type/vctrs_error_incompatible/vctrs_error/rlang_error/error/condition>
  Error in `as.character(cohort_ref[[2]]$x)`: Can't convert `x` <dbplyr_table_ident> to <character>.
  Backtrace:
       ▆
    1. ├─PatientProfiles::mockPatientProfiles(...) at test-addIntersect.R:823:2
    2. │ └─CDMConnector::cdm_from_con(...)
    3. │   └─CDMConnector::new_generated_cohort_set(...)
    4. │     ├─... %>% stringr::str_remove_all("[^A-Za-z0-9_]")
    5. │     ├─base::rev(...)
    6. │     ├─stringr::str_split(as.character(cohort_ref[[2]]$x), "\\.")
    7. │     │ └─stringr:::check_lengths(string, pattern)
    8. │     │   └─vctrs::vec_size_common(...)
    9. │     ├─base::as.character(cohort_ref[[2]]$x)
   10. │     └─vctrs:::as.character.vctrs_vctr(cohort_ref[[2]]$x)
   11. │       └─vctrs::vec_cast(x, character())
   12. ├─stringr::str_remove_all(., "[^A-Za-z0-9_]")
   13. │ └─stringr::str_replace_all(string, pattern, "")
   14. │   └─stringr:::check_lengths(string, pattern, replacement)
   15. │     └─vctrs::vec_size_common(...)
   16. └─vctrs (local) `<fn>`()
   17.   └─vctrs::vec_default_cast(...)
   18.     ├─base::withRestarts(...)
   19.     │ └─base (local) withOneRestart(expr, restarts[[1L]])
   20.     │   └─base (local) doWithOneRestart(return(expr), restart)
   21.     └─vctrs::stop_incompatible_cast(...)
   22.       └─vctrs::stop_incompatible_type(...)
   23.         └─vctrs:::stop_incompatible(...)
   24.           └─vctrs:::stop_vctrs(...)
   25.             └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = call)
  ── Error ('test-addIntersect.R:845:3'): test checkWindow function ──────────────
  <vctrs_error_cast/vctrs_error_incompatible_type/vctrs_error_incompatible/vctrs_error/rlang_error/error/condition>
  Error in `as.character(cohort_ref[[2]]$x)`: Can't convert `x` <dbplyr_table_ident> to <character>.
  Backtrace:
       ▆
    1. ├─PatientProfiles::mockPatientProfiles(connectionDetails) at test-addIntersect.R:845:2
    2. │ └─CDMConnector::cdm_from_con(...)
    3. │   └─CDMConnector::new_generated_cohort_set(...)
    4. │     ├─... %>% stringr::str_remove_all("[^A-Za-z0-9_]")
    5. │     ├─base::rev(...)
    6. │     ├─stringr::str_split(as.character(cohort_ref[[2]]$x), "\\.")
    7. │     │ └─stringr:::check_lengths(string, pattern)
    8. │     │   └─vctrs::vec_size_common(...)
    9. │     ├─base::as.character(cohort_ref[[2]]$x)
   10. │     └─vctrs:::as.character.vctrs_vctr(cohort_ref[[2]]$x)
   11. │       └─vctrs::vec_cast(x, character())
   12. ├─stringr::str_remove_all(., "[^A-Za-z0-9_]")
   13. │ └─stringr::str_replace_all(string, pattern, "")
   14. │   └─stringr:::check_lengths(string, pattern, replacement)
   15. │     └─vctrs::vec_size_common(...)
   16. └─vctrs (local) `<fn>`()
   17.   └─vctrs::vec_default_cast(...)
   18.     ├─base::withRestarts(...)
   19.     │ └─base (local) withOneRestart(expr, restarts[[1L]])
   20.     │   └─base (local) doWithOneRestart(return(expr), restart)
   21.     └─vctrs::stop_incompatible_cast(...)
   22.       └─vctrs::stop_incompatible_type(...)
   23.         └─vctrs:::stop_incompatible(...)
   24.           └─vctrs:::stop_vctrs(...)
   25.             └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = call)
  ── Error ('test-addIntersect.R:913:3'): test if column exist, overwrite ────────
  <vctrs_error_cast/vctrs_error_incompatible_type/vctrs_error_incompatible/vctrs_error/rlang_error/error/condition>
  Error in `as.character(cohort_ref[[2]]$x)`: Can't convert `x` <dbplyr_table_ident> to <character>.
  Backtrace:
       ▆
    1. ├─PatientProfiles::mockPatientProfiles(...) at test-addIntersect.R:913:2
    2. │ └─CDMConnector::cdm_from_con(...)
    3. │   └─CDMConnector::new_generated_cohort_set(...)
    4. │     ├─... %>% stringr::str_remove_all("[^A-Za-z0-9_]")
    5. │     ├─base::rev(...)
    6. │     ├─stringr::str_split(as.character(cohort_ref[[2]]$x), "\\.")
    7. │     │ └─stringr:::check_lengths(string, pattern)
    8. │     │   └─vctrs::vec_size_common(...)
    9. │     ├─base::as.character(cohort_ref[[2]]$x)
   10. │     └─vctrs:::as.character.vctrs_vctr(cohort_ref[[2]]$x)
   11. │       └─vctrs::vec_cast(x, character())
   12. ├─stringr::str_remove_all(., "[^A-Za-z0-9_]")
   13. │ └─stringr::str_replace_all(string, pattern, "")
   14. │   └─stringr:::check_lengths(string, pattern, replacement)
   15. │     └─vctrs::vec_size_common(...)
   16. └─vctrs (local) `<fn>`()
   17.   └─vctrs::vec_default_cast(...)
   18.     ├─base::withRestarts(...)
   19.     │ └─base (local) withOneRestart(expr, restarts[[1L]])
   20.     │   └─base (local) doWithOneRestart(return(expr), restart)
   21.     └─vctrs::stop_incompatible_cast(...)
   22.       └─vctrs::stop_incompatible_type(...)
   23.         └─vctrs:::stop_incompatible(...)
   24.           └─vctrs:::stop_vctrs(...)
   25.             └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = call)
  ── Error ('test-addIntersect.R:1000:3'): overlapTable is empty, check return columns ──
  <vctrs_error_cast/vctrs_error_incompatible_type/vctrs_error_incompatible/vctrs_error/rlang_error/error/condition>
  Error in `as.character(cohort_ref[[2]]$x)`: Can't convert `x` <dbplyr_table_ident> to <character>.
  Backtrace:
       ▆
    1. ├─PatientProfiles::mockPatientProfiles(...) at test-addIntersect.R:1000:2
    2. │ └─CDMConnector::cdm_from_con(...)
    3. │   └─CDMConnector::new_generated_cohort_set(...)
    4. │     ├─... %>% stringr::str_remove_all("[^A-Za-z0-9_]")
    5. │     ├─base::rev(...)
    6. │     ├─stringr::str_split(as.character(cohort_ref[[2]]$x), "\\.")
    7. │     │ └─stringr:::check_lengths(string, pattern)
    8. │     │   └─vctrs::vec_size_common(...)
    9. │     ├─base::as.character(cohort_ref[[2]]$x)
   10. │     └─vctrs:::as.character.vctrs_vctr(cohort_ref[[2]]$x)
   11. │       └─vctrs::vec_cast(x, character())
   12. ├─stringr::str_remove_all(., "[^A-Za-z0-9_]")
   13. │ └─stringr::str_replace_all(string, pattern, "")
   14. │   └─stringr:::check_lengths(string, pattern, replacement)
   15. │     └─vctrs::vec_size_common(...)
   16. └─vctrs (local) `<fn>`()
   17.   └─vctrs::vec_default_cast(...)
   18.     ├─base::withRestarts(...)
   19.     │ └─base (local) withOneRestart(expr, restarts[[1L]])
   20.     │   └─base (local) doWithOneRestart(return(expr), restart)
   21.     └─vctrs::stop_incompatible_cast(...)
   22.       └─vctrs::stop_incompatible_type(...)
   23.         └─vctrs:::stop_incompatible(...)
   24.           └─vctrs:::stop_vctrs(...)
   25.             └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = call)
  ── Error ('test-addIntersect.R:1080:3'): overlap is empty or not, multiple ids, check return columns ──
  <vctrs_error_cast/vctrs_error_incompatible_type/vctrs_error_incompatible/vctrs_error/rlang_error/error/condition>
  Error in `as.character(cohort_ref[[2]]$x)`: Can't convert `x` <dbplyr_table_ident> to <character>.
  Backtrace:
       ▆
    1. ├─PatientProfiles::mockPatientProfiles(...) at test-addIntersect.R:1080:2
    2. │ └─CDMConnector::cdm_from_con(...)
    3. │   └─CDMConnector::new_generated_cohort_set(...)
    4. │     ├─... %>% stringr::str_remove_all("[^A-Za-z0-9_]")
    5. │     ├─base::rev(...)
    6. │     ├─stringr::str_split(as.character(cohort_ref[[2]]$x), "\\.")
    7. │     │ └─stringr:::check_lengths(string, pattern)
    8. │     │   └─vctrs::vec_size_common(...)
    9. │     ├─base::as.character(cohort_ref[[2]]$x)
   10. │     └─vctrs:::as.character.vctrs_vctr(cohort_ref[[2]]$x)
   11. │       └─vctrs::vec_cast(x, character())
   12. ├─stringr::str_remove_all(., "[^A-Za-z0-9_]")
   13. │ └─stringr::str_replace_all(string, pattern, "")
   14. │   └─stringr:::check_lengths(string, pattern, replacement)
   15. │     └─vctrs::vec_size_common(...)
   16. └─vctrs (local) `<fn>`()
   17.   └─vctrs::vec_default_cast(...)
   18.     ├─base::withRestarts(...)
   19.     │ └─base (local) withOneRestart(expr, restarts[[1L]])
   20.     │   └─base (local) doWithOneRestart(return(expr), restart)
   21.     └─vctrs::stop_incompatible_cast(...)
   22.       └─vctrs::stop_incompatible_type(...)
   23.         └─vctrs:::stop_incompatible(...)
   24.           └─vctrs:::stop_vctrs(...)
   25.             └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = call)
  ── Error ('test-addIntersect.R:1201:3'): non snake columns not repeated in output ──
  <vctrs_error_cast/vctrs_error_incompatible_type/vctrs_error_incompatible/vctrs_error/rlang_error/error/condition>
  Error in `as.character(cohort_ref[[2]]$x)`: Can't convert `x` <dbplyr_table_ident> to <character>.
  Backtrace:
       ▆
    1. ├─PatientProfiles::mockPatientProfiles() at test-addIntersect.R:1201:2
    2. │ └─CDMConnector::cdm_from_con(...)
    3. │   └─CDMConnector::new_generated_cohort_set(...)
    4. │     ├─... %>% stringr::str_remove_all("[^A-Za-z0-9_]")
    5. │     ├─base::rev(...)
    6. │     ├─stringr::str_split(as.character(cohort_ref[[2]]$x), "\\.")
    7. │     │ └─stringr:::check_lengths(string, pattern)
    8. │     │   └─vctrs::vec_size_common(...)
    9. │     ├─base::as.character(cohort_ref[[2]]$x)
   10. │     └─vctrs:::as.character.vctrs_vctr(cohort_ref[[2]]$x)
   11. │       └─vctrs::vec_cast(x, character())
   12. ├─stringr::str_remove_all(., "[^A-Za-z0-9_]")
   13. │ └─stringr::str_replace_all(string, pattern, "")
   14. │   └─stringr:::check_lengths(string, pattern, replacement)
   15. │     └─vctrs::vec_size_common(...)
   16. └─vctrs (local) `<fn>`()
   17.   └─vctrs::vec_default_cast(...)
   18.     ├─base::withRestarts(...)
   19.     │ └─base (local) withOneRestart(expr, restarts[[1L]])
   20.     │   └─base (local) doWithOneRestart(return(expr), restart)
   21.     └─vctrs::stop_incompatible_cast(...)
   22.       └─vctrs::stop_incompatible_type(...)
   23.         └─vctrs:::stop_incompatible(...)
   24.           └─vctrs:::stop_vctrs(...)
   25.             └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = call)
  ── Error ('test-checks.R:37:3'): test checkCategory with length 1  ─────────────
  <vctrs_error_cast/vctrs_error_incompatible_type/vctrs_error_incompatible/vctrs_error/rlang_error/error/condition>
  Error in `as.character(cohort_ref[[2]]$x)`: Can't convert `x` <dbplyr_table_ident> to <character>.
  Backtrace:
       ▆
    1. ├─PatientProfiles::mockPatientProfiles(...) at test-checks.R:37:2
    2. │ └─CDMConnector::cdm_from_con(...)
    3. │   └─CDMConnector::new_generated_cohort_set(...)
    4. │     ├─... %>% stringr::str_remove_all("[^A-Za-z0-9_]")
    5. │     ├─base::rev(...)
    6. │     ├─stringr::str_split(as.character(cohort_ref[[2]]$x), "\\.")
    7. │     │ └─stringr:::check_lengths(string, pattern)
    8. │     │   └─vctrs::vec_size_common(...)
    9. │     ├─base::as.character(cohort_ref[[2]]$x)
   10. │     └─vctrs:::as.character.vctrs_vctr(cohort_ref[[2]]$x)
   11. │       └─vctrs::vec_cast(x, character())
   12. ├─stringr::str_remove_all(., "[^A-Za-z0-9_]")
   13. │ └─stringr::str_replace_all(string, pattern, "")
   14. │   └─stringr:::check_lengths(string, pattern, replacement)
   15. │     └─vctrs::vec_size_common(...)
   16. └─vctrs (local) `<fn>`()
   17.   └─vctrs::vec_default_cast(...)
   18.     ├─base::withRestarts(...)
   19.     │ └─base (local) withOneRestart(expr, restarts[[1L]])
   20.     │   └─base (local) doWithOneRestart(return(expr), restart)
   21.     └─vctrs::stop_incompatible_cast(...)
   22.       └─vctrs::stop_incompatible_type(...)
   23.         └─vctrs:::stop_incompatible(...)
   24.           └─vctrs:::stop_vctrs(...)
   25.             └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = call)
  ── Error ('test-checks.R:73:3'):  test checkNewName renames duplicate column names in addInObservation   ──
  <vctrs_error_cast/vctrs_error_incompatible_type/vctrs_error_incompatible/vctrs_error/rlang_error/error/condition>
  Error in `as.character(cohort_ref[[2]]$x)`: Can't convert `x` <dbplyr_table_ident> to <character>.
  Backtrace:
       ▆
    1. ├─PatientProfiles::mockPatientProfiles(connectionDetails, cohort1 = cohort1) at test-checks.R:73:2
    2. │ └─CDMConnector::cdm_from_con(...)
    3. │   └─CDMConnector::new_generated_cohort_set(...)
    4. │     ├─... %>% stringr::str_remove_all("[^A-Za-z0-9_]")
    5. │     ├─base::rev(...)
    6. │     ├─stringr::str_split(as.character(cohort_ref[[2]]$x), "\\.")
    7. │     │ └─stringr:::check_lengths(string, pattern)
    8. │     │   └─vctrs::vec_size_common(...)
    9. │     ├─base::as.character(cohort_ref[[2]]$x)
   10. │     └─vctrs:::as.character.vctrs_vctr(cohort_ref[[2]]$x)
   11. │       └─vctrs::vec_cast(x, character())
   12. ├─stringr::str_remove_all(., "[^A-Za-z0-9_]")
   13. │ └─stringr::str_replace_all(string, pattern, "")
   14. │   └─stringr:::check_lengths(string, pattern, replacement)
   15. │     └─vctrs::vec_size_common(...)
   16. └─vctrs (local) `<fn>`()
   17.   └─vctrs::vec_default_cast(...)
   18.     ├─base::withRestarts(...)
   19.     │ └─base (local) withOneRestart(expr, restarts[[1L]])
   20.     │   └─base (local) doWithOneRestart(return(expr), restart)
   21.     └─vctrs::stop_incompatible_cast(...)
   22.       └─vctrs::stop_incompatible_type(...)
   23.         └─vctrs:::stop_incompatible(...)
   24.           └─vctrs:::stop_vctrs(...)
   25.             └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = call)
  ── Error ('test-checks.R:108:3'):  test checkWindow in addIntersect ────────────
  <vctrs_error_cast/vctrs_error_incompatible_type/vctrs_error_incompatible/vctrs_error/rlang_error/error/condition>
  Error in `as.character(cohort_ref[[2]]$x)`: Can't convert `x` <dbplyr_table_ident> to <character>.
  Backtrace:
       ▆
    1. ├─PatientProfiles::mockPatientProfiles(...) at test-checks.R:108:2
    2. │ └─CDMConnector::cdm_from_con(...)
    3. │   └─CDMConnector::new_generated_cohort_set(...)
    4. │     ├─... %>% stringr::str_remove_all("[^A-Za-z0-9_]")
    5. │     ├─base::rev(...)
    6. │     ├─stringr::str_split(as.character(cohort_ref[[2]]$x), "\\.")
    7. │     │ └─stringr:::check_lengths(string, pattern)
    8. │     │   └─vctrs::vec_size_common(...)
    9. │     ├─base::as.character(cohort_ref[[2]]$x)
   10. │     └─vctrs:::as.character.vctrs_vctr(cohort_ref[[2]]$x)
   11. │       └─vctrs::vec_cast(x, character())
   12. ├─stringr::str_remove_all(., "[^A-Za-z0-9_]")
   13. │ └─stringr::str_replace_all(string, pattern, "")
   14. │   └─stringr:::check_lengths(string, pattern, replacement)
   15. │     └─vctrs::vec_size_common(...)
   16. └─vctrs (local) `<fn>`()
   17.   └─vctrs::vec_default_cast(...)
   18.     ├─base::withRestarts(...)
   19.     │ └─base (local) withOneRestart(expr, restarts[[1L]])
   20.     │   └─base (local) doWithOneRestart(return(expr), restart)
   21.     └─vctrs::stop_incompatible_cast(...)
   22.       └─vctrs::stop_incompatible_type(...)
   23.         └─vctrs:::stop_incompatible(...)
   24.           └─vctrs:::stop_vctrs(...)
   25.             └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = call)
  ── Error ('test-checks.R:189:3'): checkNameStyle ───────────────────────────────
  <vctrs_error_cast/vctrs_error_incompatible_type/vctrs_error_incompatible/vctrs_error/rlang_error/error/condition>
  Error in `as.character(cohort_ref[[2]]$x)`: Can't convert `x` <dbplyr_table_ident> to <character>.
  Backtrace:
       ▆
    1. ├─PatientProfiles::mockPatientProfiles(...) at test-checks.R:189:2
    2. │ └─CDMConnector::cdm_from_con(...)
    3. │   └─CDMConnector::new_generated_cohort_set(...)
    4. │     ├─... %>% stringr::str_remove_all("[^A-Za-z0-9_]")
    5. │     ├─base::rev(...)
    6. │     ├─stringr::str_split(as.character(cohort_ref[[2]]$x), "\\.")
    7. │     │ └─stringr:::check_lengths(string, pattern)
    8. │     │   └─vctrs::vec_size_common(...)
    9. │     ├─base::as.character(cohort_ref[[2]]$x)
   10. │     └─vctrs:::as.character.vctrs_vctr(cohort_ref[[2]]$x)
   11. │       └─vctrs::vec_cast(x, character())
   12. ├─stringr::str_remove_all(., "[^A-Za-z0-9_]")
   13. │ └─stringr::str_replace_all(string, pattern, "")
   14. │   └─stringr:::check_lengths(string, pattern, replacement)
   15. │     └─vctrs::vec_size_common(...)
   16. └─vctrs (local) `<fn>`()
   17.   └─vctrs::vec_default_cast(...)
   18.     ├─base::withRestarts(...)
   19.     │ └─base (local) withOneRestart(expr, restarts[[1L]])
   20.     │   └─base (local) doWithOneRestart(return(expr), restart)
   21.     └─vctrs::stop_incompatible_cast(...)
   22.       └─vctrs::stop_incompatible_type(...)
   23.         └─vctrs:::stop_incompatible(...)
   24.           └─vctrs:::stop_vctrs(...)
   25.             └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = call)
  ── Error ('test-summariseCharacteristics.R:57:3'): test summariseCharacteristics ──
  <vctrs_error_cast/vctrs_error_incompatible_type/vctrs_error_incompatible/vctrs_error/rlang_error/error/condition>
  Error in `as.character(cohort_ref[[2]]$x)`: Can't convert `x` <dbplyr_table_ident> to <character>.
  Backtrace:
       ▆
    1. ├─PatientProfiles::mockPatientProfiles(...) at test-summariseCharacteristics.R:57:2
    2. │ └─CDMConnector::cdm_from_con(...)
    3. │   └─CDMConnector::new_generated_cohort_set(...)
    4. │     ├─... %>% stringr::str_remove_all("[^A-Za-z0-9_]")
    5. │     ├─base::rev(...)
    6. │     ├─stringr::str_split(as.character(cohort_ref[[2]]$x), "\\.")
    7. │     │ └─stringr:::check_lengths(string, pattern)
    8. │     │   └─vctrs::vec_size_common(...)
    9. │     ├─base::as.character(cohort_ref[[2]]$x)
   10. │     └─vctrs:::as.character.vctrs_vctr(cohort_ref[[2]]$x)
   11. │       └─vctrs::vec_cast(x, character())
   12. ├─stringr::str_remove_all(., "[^A-Za-z0-9_]")
   13. │ └─stringr::str_replace_all(string, pattern, "")
   14. │   └─stringr:::check_lengths(string, pattern, replacement)
   15. │     └─vctrs::vec_size_common(...)
   16. └─vctrs (local) `<fn>`()
   17.   └─vctrs::vec_default_cast(...)
   18.     ├─base::withRestarts(...)
   19.     │ └─base (local) withOneRestart(expr, restarts[[1L]])
   20.     │   └─base (local) doWithOneRestart(return(expr), restart)
   21.     └─vctrs::stop_incompatible_cast(...)
   22.       └─vctrs::stop_incompatible_type(...)
   23.         └─vctrs:::stop_incompatible(...)
   24.           └─vctrs:::stop_vctrs(...)
   25.             └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = call)
  ── Error ('test-summariseCharacteristics.R:274:3'): test empty cohort ──────────
  <vctrs_error_cast/vctrs_error_incompatible_type/vctrs_error_incompatible/vctrs_error/rlang_error/error/condition>
  Error in `as.character(cohort_ref[[2]]$x)`: Can't convert `x` <dbplyr_table_ident> to <character>.
  Backtrace:
       ▆
    1. ├─PatientProfiles::mockPatientProfiles(...) at test-summariseCharacteristics.R:274:2
    2. │ └─CDMConnector::cdm_from_con(...)
    3. │   └─CDMConnector::new_generated_cohort_set(...)
    4. │     ├─... %>% stringr::str_remove_all("[^A-Za-z0-9_]")
    5. │     ├─base::rev(...)
    6. │     ├─stringr::str_split(as.character(cohort_ref[[2]]$x), "\\.")
    7. │     │ └─stringr:::check_lengths(string, pattern)
    8. │     │   └─vctrs::vec_size_common(...)
    9. │     ├─base::as.character(cohort_ref[[2]]$x)
   10. │     └─vctrs:::as.character.vctrs_vctr(cohort_ref[[2]]$x)
   11. │       └─vctrs::vec_cast(x, character())
   12. ├─stringr::str_remove_all(., "[^A-Za-z0-9_]")
   13. │ └─stringr::str_replace_all(string, pattern, "")
   14. │   └─stringr:::check_lengths(string, pattern, replacement)
   15. │     └─vctrs::vec_size_common(...)
   16. └─vctrs (local) `<fn>`()
   17.   └─vctrs::vec_default_cast(...)
   18.     ├─base::withRestarts(...)
   19.     │ └─base (local) withOneRestart(expr, restarts[[1L]])
   20.     │   └─base (local) doWithOneRestart(return(expr), restart)
   21.     └─vctrs::stop_incompatible_cast(...)
   22.       └─vctrs::stop_incompatible_type(...)
   23.         └─vctrs:::stop_incompatible(...)
   24.           └─vctrs:::stop_vctrs(...)
   25.             └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = call)
  ── Error ('test-summariseLargeScaleCharacteristics.R:61:3'): basic functionality large scale characteristics ──
  <vctrs_error_cast/vctrs_error_incompatible_type/vctrs_error_incompatible/vctrs_error/rlang_error/error/condition>
  Error in `as.character(cohort_ref[[2]]$x)`: Can't convert `x` <dbplyr_table_ident> to <character>.
  Backtrace:
       ▆
    1. ├─PatientProfiles::mockPatientProfiles(...) at test-summariseLargeScaleCharacteristics.R:61:2
    2. │ └─CDMConnector::cdm_from_con(...)
    3. │   └─CDMConnector::new_generated_cohort_set(...)
    4. │     ├─... %>% stringr::str_remove_all("[^A-Za-z0-9_]")
    5. │     ├─base::rev(...)
    6. │     ├─stringr::str_split(as.character(cohort_ref[[2]]$x), "\\.")
    7. │     │ └─stringr:::check_lengths(string, pattern)
    8. │     │   └─vctrs::vec_size_common(...)
    9. │     ├─base::as.character(cohort_ref[[2]]$x)
   10. │     └─vctrs:::as.character.vctrs_vctr(cohort_ref[[2]]$x)
   11. │       └─vctrs::vec_cast(x, character())
   12. ├─stringr::str_remove_all(., "[^A-Za-z0-9_]")
   13. │ └─stringr::str_replace_all(string, pattern, "")
   14. │   └─stringr:::check_lengths(string, pattern, replacement)
   15. │     └─vctrs::vec_size_common(...)
   16. └─vctrs (local) `<fn>`()
   17.   └─vctrs::vec_default_cast(...)
   18.     ├─base::withRestarts(...)
   19.     │ └─base (local) withOneRestart(expr, restarts[[1L]])
   20.     │   └─base (local) doWithOneRestart(return(expr), restart)
   21.     └─vctrs::stop_incompatible_cast(...)
   22.       └─vctrs::stop_incompatible_type(...)
   23.         └─vctrs:::stop_incompatible(...)
   24.           └─vctrs:::stop_vctrs(...)
   25.             └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = call)
  ── Error ('test-mockPatientProfiles.R:28:3'): test user define table ───────────
  <vctrs_error_cast/vctrs_error_incompatible_type/vctrs_error_incompatible/vctrs_error/rlang_error/error/condition>
  Error in `as.character(cohort_ref[[2]]$x)`: Can't convert `x` <dbplyr_table_ident> to <character>.
  Backtrace:
       ▆
    1. ├─PatientProfiles::mockPatientProfiles(connectionDetails, test_table1 = test_table1) at test-mockPatientProfiles.R:28:2
    2. │ └─CDMConnector::cdm_from_con(...)
    3. │   └─CDMConnector::new_generated_cohort_set(...)
    4. │     ├─... %>% stringr::str_remove_all("[^A-Za-z0-9_]")
    5. │     ├─base::rev(...)
    6. │     ├─stringr::str_split(as.character(cohort_ref[[2]]$x), "\\.")
    7. │     │ └─stringr:::check_lengths(string, pattern)
    8. │     │   └─vctrs::vec_size_common(...)
    9. │     ├─base::as.character(cohort_ref[[2]]$x)
   10. │     └─vctrs:::as.character.vctrs_vctr(cohort_ref[[2]]$x)
   11. │       └─vctrs::vec_cast(x, character())
   12. ├─stringr::str_remove_all(., "[^A-Za-z0-9_]")
   13. │ └─stringr::str_replace_all(string, pattern, "")
   14. │   └─stringr:::check_lengths(string, pattern, replacement)
   15. │     └─vctrs::vec_size_common(...)
   16. └─vctrs (local) `<fn>`()
   17.   └─vctrs::vec_default_cast(...)
   18.     ├─base::withRestarts(...)
   19.     │ └─base (local) withOneRestart(expr, restarts[[1L]])
   20.     │   └─base (local) doWithOneRestart(return(expr), restart)
   21.     └─vctrs::stop_incompatible_cast(...)
   22.       └─vctrs::stop_incompatible_type(...)
   23.         └─vctrs:::stop_incompatible(...)
   24.           └─vctrs:::stop_vctrs(...)
   25.             └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = call)
  ── Error ('test-mockPatientProfiles.R:50:3'): check working example with cohort table ──
  <vctrs_error_cast/vctrs_error_incompatible_type/vctrs_error_incompatible/vctrs_error/rlang_error/error/condition>
  Error in `as.character(cohort_ref[[2]]$x)`: Can't convert `x` <dbplyr_table_ident> to <character>.
  Backtrace:
       ▆
    1. ├─PatientProfiles::mockPatientProfiles(connectionDetails, cohort1 = test_table1) at test-mockPatientProfiles.R:50:2
    2. │ └─CDMConnector::cdm_from_con(...)
    3. │   └─CDMConnector::new_generated_cohort_set(...)
    4. │     ├─... %>% stringr::str_remove_all("[^A-Za-z0-9_]")
    5. │     ├─base::rev(...)
    6. │     ├─stringr::str_split(as.character(cohort_ref[[2]]$x), "\\.")
    7. │     │ └─stringr:::check_lengths(string, pattern)
    8. │     │   └─vctrs::vec_size_common(...)
    9. │     ├─base::as.character(cohort_ref[[2]]$x)
   10. │     └─vctrs:::as.character.vctrs_vctr(cohort_ref[[2]]$x)
   11. │       └─vctrs::vec_cast(x, character())
   12. ├─stringr::str_remove_all(., "[^A-Za-z0-9_]")
   13. │ └─stringr::str_replace_all(string, pattern, "")
   14. │   └─stringr:::check_lengths(string, pattern, replacement)
   15. │     └─vctrs::vec_size_common(...)
   16. └─vctrs (local) `<fn>`()
   17.   └─vctrs::vec_default_cast(...)
   18.     ├─base::withRestarts(...)
   19.     │ └─base (local) withOneRestart(expr, restarts[[1L]])
   20.     │   └─base (local) doWithOneRestart(return(expr), restart)
   21.     └─vctrs::stop_incompatible_cast(...)
   22.       └─vctrs::stop_incompatible_type(...)
   23.         └─vctrs:::stop_incompatible(...)
   24.           └─vctrs:::stop_vctrs(...)
   25.             └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = call)
  ── Error ('test-mockPatientProfiles.R:61:3'): check working example with defaults ──
  <vctrs_error_cast/vctrs_error_incompatible_type/vctrs_error_incompatible/vctrs_error/rlang_error/error/condition>
  Error in `as.character(cohort_ref[[2]]$x)`: Can't convert `x` <dbplyr_table_ident> to <character>.
  Backtrace:
       ▆
    1. ├─PatientProfiles::mockPatientProfiles(connectionDetails) at test-mockPatientProfiles.R:61:2
    2. │ └─CDMConnector::cdm_from_con(...)
    3. │   └─CDMConnector::new_generated_cohort_set(...)
    4. │     ├─... %>% stringr::str_remove_all("[^A-Za-z0-9_]")
    5. │     ├─base::rev(...)
    6. │     ├─stringr::str_split(as.character(cohort_ref[[2]]$x), "\\.")
    7. │     │ └─stringr:::check_lengths(string, pattern)
    8. │     │   └─vctrs::vec_size_common(...)
    9. │     ├─base::as.character(cohort_ref[[2]]$x)
   10. │     └─vctrs:::as.character.vctrs_vctr(cohort_ref[[2]]$x)
   11. │       └─vctrs::vec_cast(x, character())
   12. ├─stringr::str_remove_all(., "[^A-Za-z0-9_]")
   13. │ └─stringr::str_replace_all(string, pattern, "")
   14. │   └─stringr:::check_lengths(string, pattern, replacement)
   15. │     └─vctrs::vec_size_common(...)
   16. └─vctrs (local) `<fn>`()
   17.   └─vctrs::vec_default_cast(...)
   18.     ├─base::withRestarts(...)
   19.     │ └─base (local) withOneRestart(expr, restarts[[1L]])
   20.     │   └─base (local) doWithOneRestart(return(expr), restart)
   21.     └─vctrs::stop_incompatible_cast(...)
   22.       └─vctrs::stop_incompatible_type(...)
   23.         └─vctrs:::stop_incompatible(...)
   24.           └─vctrs:::stop_vctrs(...)
   25.             └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = call)
  ── Error ('test-mockPatientProfiles.R:69:3'): check dug exposure and patient table size ──
  <vctrs_error_cast/vctrs_error_incompatible_type/vctrs_error_incompatible/vctrs_error/rlang_error/error/condition>
  Error in `as.character(cohort_ref[[2]]$x)`: Can't convert `x` <dbplyr_table_ident> to <character>.
  Backtrace:
       ▆
    1. ├─PatientProfiles::mockPatientProfiles(...) at test-mockPatientProfiles.R:69:2
    2. │ └─CDMConnector::cdm_from_con(...)
    3. │   └─CDMConnector::new_generated_cohort_set(...)
    4. │     ├─... %>% stringr::str_remove_all("[^A-Za-z0-9_]")
    5. │     ├─base::rev(...)
    6. │     ├─stringr::str_split(as.character(cohort_ref[[2]]$x), "\\.")
    7. │     │ └─stringr:::check_lengths(string, pattern)
    8. │     │   └─vctrs::vec_size_common(...)
    9. │     ├─base::as.character(cohort_ref[[2]]$x)
   10. │     └─vctrs:::as.character.vctrs_vctr(cohort_ref[[2]]$x)
   11. │       └─vctrs::vec_cast(x, character())
   12. ├─stringr::str_remove_all(., "[^A-Za-z0-9_]")
   13. │ └─stringr::str_replace_all(string, pattern, "")
   14. │   └─stringr:::check_lengths(string, pattern, replacement)
   15. │     └─vctrs::vec_size_common(...)
   16. └─vctrs (local) `<fn>`()
   17.   └─vctrs::vec_default_cast(...)
   18.     ├─base::withRestarts(...)
   19.     │ └─base (local) withOneRestart(expr, restarts[[1L]])
   20.     │   └─base (local) doWithOneRestart(return(expr), restart)
   21.     └─vctrs::stop_incompatible_cast(...)
   22.       └─vctrs::stop_incompatible_type(...)
   23.         └─vctrs:::stop_incompatible(...)
   24.           └─vctrs:::stop_vctrs(...)
   25.             └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = call)
  ── Failure ('test-mockPatientProfiles.R:76:3'): add cdm with person, cohort1 and observation_period ──
  Expected `... <- NULL` to run without any errors.
  i Actually got a <vctrs_error_cast> with text:
    Can't convert `x` <dbplyr_table_ident> to <character>.
  ── Error ('test-mockPatientProfiles.R:120:3'): attributes for cohort table ─────
  <vctrs_error_cast/vctrs_error_incompatible_type/vctrs_error_incompatible/vctrs_error/rlang_error/error/condition>
  Error in `as.character(cohort_ref[[2]]$x)`: Can't convert `x` <dbplyr_table_ident> to <character>.
  Backtrace:
       ▆
    1. ├─PatientProfiles::mockPatientProfiles(connectionDetails, test_table1 = test_table1) at test-mockPatientProfiles.R:120:2
    2. │ └─CDMConnector::cdm_from_con(...)
    3. │   └─CDMConnector::new_generated_cohort_set(...)
    4. │     ├─... %>% stringr::str_remove_all("[^A-Za-z0-9_]")
    5. │     ├─base::rev(...)
    6. │     ├─stringr::str_split(as.character(cohort_ref[[2]]$x), "\\.")
    7. │     │ └─stringr:::check_lengths(string, pattern)
    8. │     │   └─vctrs::vec_size_common(...)
    9. │     ├─base::as.character(cohort_ref[[2]]$x)
   10. │     └─vctrs:::as.character.vctrs_vctr(cohort_ref[[2]]$x)
   11. │       └─vctrs::vec_cast(x, character())
   12. ├─stringr::str_remove_all(., "[^A-Za-z0-9_]")
   13. │ └─stringr::str_replace_all(string, pattern, "")
   14. │   └─stringr:::check_lengths(string, pattern, replacement)
   15. │     └─vctrs::vec_size_common(...)
   16. └─vctrs (local) `<fn>`()
   17.   └─vctrs::vec_default_cast(...)
   18.     ├─base::withRestarts(...)
   19.     │ └─base (local) withOneRestart(expr, restarts[[1L]])
   20.     │   └─base (local) doWithOneRestart(return(expr), restart)
   21.     └─vctrs::stop_incompatible_cast(...)
   22.       └─vctrs::stop_incompatible_type(...)
   23.         └─vctrs:::stop_incompatible(...)
   24.           └─vctrs:::stop_vctrs(...)
   25.             └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = call)
  ── Error ('test-summariseResult.R:67:3'): groups and strata ────────────────────
  <vctrs_error_cast/vctrs_error_incompatible_type/vctrs_error_incompatible/vctrs_error/rlang_error/error/condition>
  Error in `as.character(cohort_ref[[2]]$x)`: Can't convert `x` <dbplyr_table_ident> to <character>.
  Backtrace:
       ▆
    1. ├─PatientProfiles::mockPatientProfiles(patient_size = 1000, drug_exposure_size = 1000) at test-summariseResult.R:67:2
    2. │ └─CDMConnector::cdm_from_con(...)
    3. │   └─CDMConnector::new_generated_cohort_set(...)
    4. │     ├─... %>% stringr::str_remove_all("[^A-Za-z0-9_]")
    5. │     ├─base::rev(...)
    6. │     ├─stringr::str_split(as.character(cohort_ref[[2]]$x), "\\.")
    7. │     │ └─stringr:::check_lengths(string, pattern)
    8. │     │   └─vctrs::vec_size_common(...)
    9. │     ├─base::as.character(cohort_ref[[2]]$x)
   10. │     └─vctrs:::as.character.vctrs_vctr(cohort_ref[[2]]$x)
   11. │       └─vctrs::vec_cast(x, character())
   12. ├─stringr::str_remove_all(., "[^A-Za-z0-9_]")
   13. │ └─stringr::str_replace_all(string, pattern, "")
   14. │   └─stringr:::check_lengths(string, pattern, replacement)
   15. │     └─vctrs::vec_size_common(...)
   16. └─vctrs (local) `<fn>`()
   17.   └─vctrs::vec_default_cast(...)
   18.     ├─base::withRestarts(...)
   19.     │ └─base (local) withOneRestart(expr, restarts[[1L]])
   20.     │   └─base (local) doWithOneRestart(return(expr), restart)
   21.     └─vctrs::stop_incompatible_cast(...)
   22.       └─vctrs::stop_incompatible_type(...)
   23.         └─vctrs:::stop_incompatible(...)
   24.           └─vctrs:::stop_vctrs(...)
   25.             └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = call)
  ── Error ('test-summariseResult.R:146:3'): table in db or local ────────────────
  <vctrs_error_cast/vctrs_error_incompatible_type/vctrs_error_incompatible/vctrs_error/rlang_error/error/condition>
  Error in `as.character(cohort_ref[[2]]$x)`: Can't convert `x` <dbplyr_table_ident> to <character>.
  Backtrace:
       ▆
    1. ├─PatientProfiles::mockPatientProfiles(patient_size = 1000, drug_exposure_size = 1000) at test-summariseResult.R:146:2
    2. │ └─CDMConnector::cdm_from_con(...)
    3. │   └─CDMConnector::new_generated_cohort_set(...)
    4. │     ├─... %>% stringr::str_remove_all("[^A-Za-z0-9_]")
    5. │     ├─base::rev(...)
    6. │     ├─stringr::str_split(as.character(cohort_ref[[2]]$x), "\\.")
    7. │     │ └─stringr:::check_lengths(string, pattern)
    8. │     │   └─vctrs::vec_size_common(...)
    9. │     ├─base::as.character(cohort_ref[[2]]$x)
   10. │     └─vctrs:::as.character.vctrs_vctr(cohort_ref[[2]]$x)
   11. │       └─vctrs::vec_cast(x, character())
   12. ├─stringr::str_remove_all(., "[^A-Za-z0-9_]")
   13. │ └─stringr::str_replace_all(string, pattern, "")
   14. │   └─stringr:::check_lengths(string, pattern, replacement)
   15. │     └─vctrs::vec_size_common(...)
   16. └─vctrs (local) `<fn>`()
   17.   └─vctrs::vec_default_cast(...)
   18.     ├─base::withRestarts(...)
   19.     │ └─base (local) withOneRestart(expr, restarts[[1L]])
   20.     │   └─base (local) doWithOneRestart(return(expr), restart)
   21.     └─vctrs::stop_incompatible_cast(...)
   22.       └─vctrs::stop_incompatible_type(...)
   23.         └─vctrs:::stop_incompatible(...)
   24.           └─vctrs:::stop_vctrs(...)
   25.             └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = call)
  ── Error ('test-summariseResult.R:172:3'): with and with overall groups and strata ──
  <vctrs_error_cast/vctrs_error_incompatible_type/vctrs_error_incompatible/vctrs_error/rlang_error/error/condition>
  Error in `as.character(cohort_ref[[2]]$x)`: Can't convert `x` <dbplyr_table_ident> to <character>.
  Backtrace:
       ▆
    1. ├─PatientProfiles::mockPatientProfiles(patient_size = 1000, drug_exposure_size = 1000) at test-summariseResult.R:172:2
    2. │ └─CDMConnector::cdm_from_con(...)
    3. │   └─CDMConnector::new_generated_cohort_set(...)
    4. │     ├─... %>% stringr::str_remove_all("[^A-Za-z0-9_]")
    5. │     ├─base::rev(...)
    6. │     ├─stringr::str_split(as.character(cohort_ref[[2]]$x), "\\.")
    7. │     │ └─stringr:::check_lengths(string, pattern)
    8. │     │   └─vctrs::vec_size_common(...)
    9. │     ├─base::as.character(cohort_ref[[2]]$x)
   10. │     └─vctrs:::as.character.vctrs_vctr(cohort_ref[[2]]$x)
   11. │       └─vctrs::vec_cast(x, character())
   12. ├─stringr::str_remove_all(., "[^A-Za-z0-9_]")
   13. │ └─stringr::str_replace_all(string, pattern, "")
   14. │   └─stringr:::check_lengths(string, pattern, replacement)
   15. │     └─vctrs::vec_size_common(...)
   16. └─vctrs (local) `<fn>`()
   17.   └─vctrs::vec_default_cast(...)
   18.     ├─base::withRestarts(...)
   19.     │ └─base (local) withOneRestart(expr, restarts[[1L]])
   20.     │   └─base (local) doWithOneRestart(return(expr), restart)
   21.     └─vctrs::stop_incompatible_cast(...)
   22.       └─vctrs::stop_incompatible_type(...)
   23.         └─vctrs:::stop_incompatible(...)
   24.           └─vctrs:::stop_vctrs(...)
   25.             └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = call)
  ── Error ('test-summariseResult.R:285:3'): test empty cohort ───────────────────
  <vctrs_error_cast/vctrs_error_incompatible_type/vctrs_error_incompatible/vctrs_error/rlang_error/error/condition>
  Error in `as.character(cohort_ref[[2]]$x)`: Can't convert `x` <dbplyr_table_ident> to <character>.
  Backtrace:
       ▆
    1. ├─PatientProfiles::mockPatientProfiles(connectionDetails, dus_cohort = dus_cohort) at test-summariseResult.R:285:2
    2. │ └─CDMConnector::cdm_from_con(...)
    3. │   └─CDMConnector::new_generated_cohort_set(...)
    4. │     ├─... %>% stringr::str_remove_all("[^A-Za-z0-9_]")
    5. │     ├─base::rev(...)
    6. │     ├─stringr::str_split(as.character(cohort_ref[[2]]$x), "\\.")
    7. │     │ └─stringr:::check_lengths(string, pattern)
    8. │     │   └─vctrs::vec_size_common(...)
    9. │     ├─base::as.character(cohort_ref[[2]]$x)
   10. │     └─vctrs:::as.character.vctrs_vctr(cohort_ref[[2]]$x)
   11. │       └─vctrs::vec_cast(x, character())
   12. ├─stringr::str_remove_all(., "[^A-Za-z0-9_]")
   13. │ └─stringr::str_replace_all(string, pattern, "")
   14. │   └─stringr:::check_lengths(string, pattern, replacement)
   15. │     └─vctrs::vec_size_common(...)
   16. └─vctrs (local) `<fn>`()
   17.   └─vctrs::vec_default_cast(...)
   18.     ├─base::withRestarts(...)
   19.     │ └─base (local) withOneRestart(expr, restarts[[1L]])
   20.     │   └─base (local) doWithOneRestart(return(expr), restart)
   21.     └─vctrs::stop_incompatible_cast(...)
   22.       └─vctrs::stop_incompatible_type(...)
   23.         └─vctrs:::stop_incompatible(...)
   24.           └─vctrs:::stop_vctrs(...)
   25.             └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = call)
  ── Error ('test-summariseResult.R:331:3'): test summary table naming ───────────
  <vctrs_error_cast/vctrs_error_incompatible_type/vctrs_error_incompatible/vctrs_error/rlang_error/error/condition>
  Error in `as.character(cohort_ref[[2]]$x)`: Can't convert `x` <dbplyr_table_ident> to <character>.
  Backtrace:
       ▆
    1. ├─PatientProfiles::mockPatientProfiles(connectionDetails) at test-summariseResult.R:331:2
    2. │ └─CDMConnector::cdm_from_con(...)
    3. │   └─CDMConnector::new_generated_cohort_set(...)
    4. │     ├─... %>% stringr::str_remove_all("[^A-Za-z0-9_]")
    5. │     ├─base::rev(...)
    6. │     ├─stringr::str_split(as.character(cohort_ref[[2]]$x), "\\.")
    7. │     │ └─stringr:::check_lengths(string, pattern)
    8. │     │   └─vctrs::vec_size_common(...)
    9. │     ├─base::as.character(cohort_ref[[2]]$x)
   10. │     └─vctrs:::as.character.vctrs_vctr(cohort_ref[[2]]$x)
   11. │       └─vctrs::vec_cast(x, character())
   12. ├─stringr::str_remove_all(., "[^A-Za-z0-9_]")
   13. │ └─stringr::str_replace_all(string, pattern, "")
   14. │   └─stringr:::check_lengths(string, pattern, replacement)
   15. │     └─vctrs::vec_size_common(...)
   16. └─vctrs (local) `<fn>`()
   17.   └─vctrs::vec_default_cast(...)
   18.     ├─base::withRestarts(...)
   19.     │ └─base (local) withOneRestart(expr, restarts[[1L]])
   20.     │   └─base (local) doWithOneRestart(return(expr), restart)
   21.     └─vctrs::stop_incompatible_cast(...)
   22.       └─vctrs::stop_incompatible_type(...)
   23.         └─vctrs:::stop_incompatible(...)
   24.           └─vctrs:::stop_vctrs(...)
   25.             └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = call)
  
  [ FAIL 81 | WARN 16 | SKIP 0 | PASS 91 ]
  Error: Test failures
  Execution halted