Running ‘testthat.R’ [65s/83s]
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/testing-design.html#sec-tests-files-overview
  > # * https://testthat.r-lib.org/articles/special-files.html
  > 
  > library(testthat)
  > library(healthdb)
  > 
  > test_check("healthdb")
  
  The following records have start > end:
     uid clnt_id      dates   ans diagx diagx_1 diagx_2   end_date
  1    3       1 2020-12-19   any     d       q     999 2020-12-12
  2    1       1 2020-12-28   any     t       v    <NA> 2020-12-21
  3    5       5 2019-08-29   any     d       b     999 2019-08-22
  4    2      10 2018-10-27   any     x       d    <NA> 2018-10-20
  5   13      12 2016-09-06 noise   999    <NA>     999 2016-08-30
  6   24      13 2017-07-07 noise   999     999    <NA> 2017-06-30
  7   20      16 2017-09-22 noise   999    <NA>    <NA> 2017-09-15
  8    7      17 2018-03-24   any     p       h    <NA> 2018-03-17
  9   16      18 2015-06-04 noise   999    <NA>     999 2015-05-28
  10  12      19 2015-09-08   all     z       w       f 2015-09-01
  11  11      21 2018-01-24   all     c       u       d 2018-01-17
  12  14      21 2018-08-17 noise   999    <NA>    <NA> 2018-08-10
  13   6      21 2020-08-16   any     b    <NA>     999 2020-08-09
  14  21      22 2016-08-31 noise   999    <NA>    <NA> 2016-08-24
  15   9      25 2020-11-30   all     b       h       i 2020-11-23
  16  18      30 2018-02-22 noise   999     999     999 2018-02-15
  17   8      34 2017-02-12   any     x       b     999 2017-02-05
  18  10      34 2018-10-12   all     b       g       r 2018-10-05
  19  19      36 2019-04-30 noise   999     999    <NA> 2019-04-23
  20  23      38 2016-05-19 noise   999     999     999 2016-05-12
  21  15      45 2016-06-27 noise   999    <NA>     999 2016-06-20
  22  25      47 2015-04-19 noise   999     999     999 2015-04-12
  23   4      47 2017-08-30   any     f       v    <NA> 2017-08-23
  24  17      48 2017-02-04 noise   999    <NA>     999 2017-01-28
  25  22      50 2015-02-22 noise   999    <NA>     999 2015-02-15
  
  The following records have missing dates:
    uid clnt_id      dates ans diagx diagx_1 diagx_2 end_date
  1   1      39 2017-09-09 any     u       d     999       NA
  > --------------Inclusion step--------------
  
  i Identify records with condition(s):
  * where at least one of the diagx, diagx_1, diagx_2 column(s) in each record
  * contains a value exactly matched values in set: letters
  i To see the final query generated by 'dbplyr', use dplyr::show_query() on the output.
  To extract the SQL string, use dbplyr::remote_query().
  
  This message is displayed once per session.
  > --------------Exclusion step--------------
  
  i Identify records with condition(s):
  * where at least one of the diagx, diagx_1, diagx_2 column(s) in each record
  * contains a value exactly matched values in set: c("a", "b")
  i Exclude records in `data` through anti_join with `excl` matching on (by argument): "clnt_id" 
  
  > --------------No. rows restriction--------------
  
  i Apply restriction that each client must have at least 2 records with distinct dates. Clients/groups which did not met the condition were excluded.
  > --------------Time span restriction--------------
  
  i Exclude a subset of `data` that satisfies condition: ans == "noise" 
  Check NAs in the result; SQL handles missing value differently compared to R.
  
  i Exclude a subset of `data` that satisfies condition: ans == "noise" 
  
  i Consider being explicit about NA, e.g., condition = var == 'val' | is.na(var)
  
  i Exclude a subset of `data` that satisfies condition: ans == "noise" 
  Check NAs in the result; SQL handles missing value differently compared to R.
  
  i Consider being explicit about NA, e.g., condition = var == 'val' | is.na(var)
  
  i Identify records with condition(s):
  * where at least one of the diagx, diagx_1, diagx_2 column(s) in each record
  * contains a value exactly matched values in set: letters
  i Identify records with condition(s):
  * where at least one of the diagx, diagx_1, diagx_2 column(s) in each record
  * contains a value exactly matched values in set: 1:10
  [ FAIL 1 | WARN 2 | SKIP 6 | PASS 225 ]
  
  ══ Skipped tests (6) ═══════════════════════════════════════════════════════════
  • On CRAN (6): 'test-define_case.R:42:3', 'test-if_dates.R:2:3',
    'test-if_dates.R:26:3', 'test-if_dates.R:33:3',
    'test-restrict_dates_sql.R:26:3', 'test-restrict_dates_sql.R:101:3'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-restrict_dates_sql.R:19:3'): apart only works ──────────────────
  Error in `c_character(...)`: Character input expected
  Backtrace:
       ▆
    1. ├─... %>% dplyr::collect() at test-restrict_dates_sql.R:19:3
    2. ├─dplyr::collect(.)
    3. ├─dbplyr:::collect.tbl_sql(.)
    4. │ └─dbplyr::db_sql_render(x$src$con, x, cte = cte)
    5. │   ├─dbplyr::db_sql_render(con, sql, ..., sql_options = sql_options)
    6. │   └─dbplyr:::db_sql_render.DBIConnection(con, sql, ..., sql_options = sql_options)
    7. │     ├─dbplyr::sql_render(sql, con = con, ..., sql_options = sql_options)
    8. │     └─dbplyr:::sql_render.tbl_lazy(sql, con = con, ..., sql_options = sql_options)
    9. │       ├─dbplyr::sql_render(...)
   10. │       └─dbplyr:::sql_render.lazy_query(...)
   11. │         ├─dbplyr::sql_build(query, con = con, sql_options = sql_options)
   12. │         └─dbplyr:::sql_build.lazy_select_query(query, con = con, sql_options = sql_options)
   13. │           ├─dbplyr::sql_build(op$x, con, sql_options = sql_options)
   14. │           └─dbplyr:::sql_build.lazy_select_query(op$x, con, sql_options = sql_options)
   15. │             ├─dbplyr::sql_build(op$x, con, sql_options = sql_options)
   16. │             └─dbplyr:::sql_build.lazy_select_query(op$x, con, sql_options = sql_options)
   17. │               ├─dbplyr::sql_build(op$x, con, sql_options = sql_options)
   18. │               └─dbplyr:::sql_build.lazy_select_query(op$x, con, sql_options = sql_options)
   19. │                 ├─dbplyr::sql_build(op$x, con, sql_options = sql_options)
   20. │                 └─dbplyr:::sql_build.lazy_select_query(op$x, con, sql_options = sql_options)
   21. │                   └─dbplyr:::get_select_sql(...)
   22. │                     └─dbplyr:::translate_select_sql(con, select)
   23. │                       └─dbplyr::translate_sql_(...)
   24. │                         └─base::lapply(...)
   25. │                           └─dbplyr (local) FUN(X[[i]], ...)
   26. │                             ├─dbplyr::escape(eval_tidy(x, mask), con = con)
   27. │                             └─rlang::eval_tidy(x, mask)
   28. └─dplyr::between(...)
   29.   └─dbplyr::sql_expr(!!x %BETWEEN% !!left %AND% !!right)
   30.     └─dbplyr::sql(x)
   31.       └─dbplyr:::c_character(...)
   32.         └─cli::cli_abort("Character input expected")
   33.           └─rlang::abort(...)
  
  [ FAIL 1 | WARN 2 | SKIP 6 | PASS 225 ]
  Error: Test failures
  Execution halted