R Under development (unstable) (2024-05-22 r86590 ucrt) -- "Unsuffered Consequences" Copyright (C) 2024 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 14 1 2020-12-15 noise 999 999 999 2020-12-08 2 21 4 2019-05-19 noise 999 999 999 2019-05-12 3 8 5 2016-07-02 any t q 2016-06-25 4 3 13 2015-11-17 any z x 999 2015-11-10 5 19 17 2018-03-16 noise 999 2018-03-09 6 22 19 2016-11-30 noise 999 2016-11-23 7 5 19 2018-07-12 any y i 999 2018-07-05 8 20 19 2018-09-26 noise 999 999 2018-09-19 9 11 21 2019-07-26 all a n z 2019-07-19 10 13 22 2015-08-05 noise 999 999 999 2015-07-29 11 6 29 2019-05-01 any k o 2019-04-24 12 18 29 2020-12-12 noise 999 2020-12-05 13 17 31 2016-10-02 noise 999 999 2016-09-25 14 16 31 2020-01-07 noise 999 999 2019-12-31 15 4 33 2019-12-22 any c x 999 2019-12-15 16 12 36 2016-12-09 all b e i 2016-12-02 17 23 37 2018-06-08 noise 999 999 2018-06-01 18 10 37 2020-08-30 all y k z 2020-08-23 19 7 40 2015-02-21 any q g 999 2015-02-14 20 24 40 2020-04-28 noise 999 2020-04-21 21 25 41 2019-05-19 noise 999 999 2019-05-12 22 2 41 2019-08-29 any a b 999 2019-08-22 23 9 45 2016-07-29 all t w g 2016-07-22 24 1 46 2015-06-14 any p d 2015-06-07 25 15 48 2016-08-07 noise 999 999 999 2016-07-31 The following records have missing dates: uid clnt_id dates ans diagx diagx_1 diagx_2 end_date 1 1 21 2020-08-27 any i v 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 221 ] ══ 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 221 ] > > proc.time() user system elapsed 50.09 1.89 54.43