R Under development (unstable) (2025-01-15 r87581 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/tests.html > # * https://testthat.r-lib.org/reference/test_package.html#special-files > > library(testthat) > library(CohortConstructor) > > test_check("CohortConstructor") Starting 2 test processes [ FAIL 4 | WARN 9 | SKIP 121 | PASS 50 ] ══ Skipped tests (121) ═════════════════════════════════════════════════════════ • On CRAN (121): 'test-addIndex.R:2:3', 'test-addIndex.R:24:3', 'test-collapseCohorts.R:2:3', 'test-collapseCohorts.R:108:3', 'test-collapseCohorts.R:195:3', 'test-collapseCohorts.R:253:3', 'test-collapseCohorts.R:317:3', 'test-demographicsCohort.R:2:3', 'test-demographicsCohort.R:42:3', 'test-demographicsCohort.R:78:3', 'test-demographicsCohort.R:108:3', 'test-demographicsCohort.R:144:3', 'test-demographicsCohort.R:215:3', 'test-entryAtColumnDate.R:2:3', 'test-entryAtColumnDate.R:64:3', 'test-entryAtColumnDate.R:147:3', 'test-exitAtColumnDate.R:2:3', 'test-exitAtColumnDate.R:67:3', 'test-exitAtColumnDate.R:138:3', 'test-exitAtColumnDate.R:215:3', 'test-exitAtDate.R:118:3', 'test-exitAtDate.R:174:3', 'test-intersectCohorts.R:2:3', 'test-intersectCohorts.R:50:3', 'test-intersectCohorts.R:101:3', 'test-intersectCohorts.R:148:3', 'test-intersectCohorts.R:205:3', 'test-intersectCohorts.R:286:3', 'test-intersectCohorts.R:337:3', 'test-intersectCohorts.R:394:3', 'test-intersectCohorts.R:441:3', 'test-intersectCohorts.R:548:3', 'test-intersectCohorts.R:604:3', 'test-intersectCohorts.R:644:3', 'test-matchCohorts.R:2:3', 'test-matchCohorts.R:79:3', 'test-matchCohorts.R:124:3', 'test-matchCohorts.R:184:3', 'test-matchCohorts.R:284:3', 'test-matchCohorts.R:313:3', 'test-measurementCohort.R:2:3', 'test-measurementCohort.R:244:3', 'test-measurementCohort.R:329:3', 'test-measurementCohort.R:385:3', 'test-padCohortDate.R:2:3', 'test-padCohortDate.R:57:3', 'test-padCohortDate.R:129:3', 'test-padCohortDate.R:166:3', 'test-padCohortDate.R:317:3', 'test-padCohortDate.R:354:3', 'test-requireCohortIntersect.R:2:3', 'test-requireCohortIntersect.R:144:3', 'test-requireCohortIntersect.R:180:3', 'test-requireCohortIntersect.R:299:3', 'test-requireConceptIntersect.R:2:3', 'test-requireConceptIntersect.R:123:3', 'test-requireConceptIntersect.R:204:3', 'test-requireConceptIntersect.R:311:3', 'test-requireDateRange.R:2:3', 'test-requireDateRange.R:101:3', 'test-requireDateRange.R:159:3', 'test-requireDeathFlag.R:2:3', 'test-requireDeathFlag.R:78:3', 'test-requireDeathFlag.R:123:3', 'test-requireDemographics.R:2:3', 'test-requireDemographics.R:123:3', 'test-requireDemographics.R:168:3', 'test-requireDemographics.R:207:3', 'test-requireDemographics.R:232:3', 'test-requireDemographics.R:256:3', 'test-requireDemographics.R:407:3', 'test-requireDemographics.R:453:3', 'test-requireDemographics.R:482:3', 'test-requireDemographics.R:510:3', 'test-requireDemographics.R:531:3', 'test-requireIsEntry.R:24:3', 'test-requireIsEntry.R:62:3', 'test-requireIsEntry.R:76:3', 'test-requireIsEntry.R:119:3', 'test-requireIsEntry.R:218:3', 'test-requireMinCohortCount.R:2:3', 'test-requireMinCohortCount.R:110:3', 'test-requireTableIntersect.R:2:3', 'test-requireTableIntersect.R:97:3', 'test-requireTableIntersect.R:176:3', 'test-requireTableIntersect.R:292:3', 'test-sampleCohorts.R:2:3', 'test-sampleCohorts.R:32:3', 'test-sampleCohorts.R:62:3', 'test-sampleCohorts.R:82:3', 'test-sampleCohorts.R:105:3', 'test-sampleCohorts.R:126:3', 'test-stratifyCohorts.R:2:3', 'test-stratifyCohorts.R:129:3', 'test-subsetCohorts.R:2:3', 'test-subsetCohorts.R:47:3', 'test-subsetCohorts.R:94:3', 'test-subsetCohorts.R:113:3', 'test-trimDemographics.R:2:3', 'test-trimDemographics.R:324:3', 'test-trimDemographics.R:386:3', 'test-unionCohorts.R:2:3', 'test-unionCohorts.R:76:3', 'test-unionCohorts.R:153:3', 'test-unionCohorts.R:206:3', 'test-unionCohorts.R:283:3', 'test-unionCohorts.R:307:3', 'test-unionCohorts.R:346:3', 'test-yearCohorts.R:2:3', 'test-yearCohorts.R:119:3', 'test-yearCohorts.R:190:3', 'test-conceptCohort.R:2:3', 'test-conceptCohort.R:216:3', 'test-conceptCohort.R:246:3', 'test-conceptCohort.R:293:3', 'test-conceptCohort.R:439:3', 'test-conceptCohort.R:485:3', 'test-conceptCohort.R:557:3', 'test-conceptCohort.R:614:3', 'test-conceptCohort.R:678:3', 'test-conceptCohort.R:888:3' ══ Failed tests ════════════════════════════════════════════════════════════════ ── Failure ('test-conceptCohort.R:139:3'): simple example ────────────────────── dplyr::pull(dplyr::tally(cohort)) == 2 is not TRUE `actual`: FALSE `expected`: TRUE ── Failure ('test-conceptCohort.R:140:3'): simple example ────────────────────── cohortCount(cohort)$number_records == 2 is not TRUE `actual`: FALSE `expected`: TRUE ── Failure ('test-conceptCohort.R:149:3'): simple example ────────────────────── dplyr::as_tibble(attrition(cohort)) (`actual`) not identical to dplyr::tibble(...) (`expected`). actual vs expected number_records excluded_records actual[1, ] 9 0 actual[2, ] 9 0 - actual[3, ] 5 4 + expected[3, ] 4 5 - actual[4, ] 3 2 + expected[4, ] 2 2 `actual$number_records`: 9 9 5 3 `expected$number_records`: 9 9 4 2 `actual$excluded_records`: 0 0 4 2 `expected$excluded_records`: 0 0 5 2 ── Failure ('test-conceptCohort.R:172:3'): simple example ────────────────────── `cohort` (`actual`) not equal to dplyr::tibble(...) (`expected`). `attr(actual, 'row.names')`: 1 2 3 `attr(expected, 'row.names')`: 1 2 actual vs expected cohort_definition_id subject_id cohort_start_date cohort_end_date actual[1, ] 1 1 2020-01-01 2022-03-11 - actual[2, ] 1 1 2024-02-09 2024-05-19 - actual[3, ] 1 2 2020-01-11 2024-02-22 + expected[2, ] 1 2 2020-01-11 2024-01-01 `actual$cohort_definition_id`: 1 1 1 `expected$cohort_definition_id`: 1 1 `actual$subject_id`: 1 1 2 `expected$subject_id`: 1 2 `actual$cohort_start_date`: "2020-01-01" "2024-02-09" "2020-01-11" `expected$cohort_start_date`: "2020-01-01" "2020-01-11" `actual$cohort_end_date`: "2022-03-11" "2024-05-19" "2024-02-22" `expected$cohort_end_date`: "2022-03-11" "2024-01-01" [ FAIL 4 | WARN 9 | SKIP 121 | PASS 50 ] Error: Test failures Execution halted