R Under development (unstable) (2025-02-26 r87830 ucrt) -- "Unsuffered Consequences" Copyright (C) 2025 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > # 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 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 2018-10-20 5 13 12 2016-09-06 noise 999 999 2016-08-30 6 24 13 2017-07-07 noise 999 999 2017-06-30 7 20 16 2017-09-22 noise 999 2017-09-15 8 7 17 2018-03-24 any p h 2018-03-17 9 16 18 2015-06-04 noise 999 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 2018-08-10 13 6 21 2020-08-16 any b 999 2020-08-09 14 21 22 2016-08-31 noise 999 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 2019-04-23 20 23 38 2016-05-19 noise 999 999 999 2016-05-12 21 15 45 2016-06-27 noise 999 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 2017-08-23 24 17 48 2017-02-04 noise 999 999 2017-01-28 25 22 50 2015-02-22 noise 999 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 0 | WARN 2 | SKIP 6 | PASS 226 ] ══ 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' [ FAIL 0 | WARN 2 | SKIP 6 | PASS 226 ] > > proc.time() user system elapsed 28.12 0.87 29.00