* using log directory 'd:/RCompile/CRANincoming/R-devel/CohortConstructor.Rcheck' * using R Under development (unstable) (2025-01-15 r87581 ucrt) * using platform: x86_64-w64-mingw32 * R was compiled by gcc.exe (GCC) 13.3.0 GNU Fortran (GCC) 13.3.0 * running under: Windows Server 2022 x64 (build 20348) * using session charset: UTF-8 * checking for file 'CohortConstructor/DESCRIPTION' ... OK * this is package 'CohortConstructor' version '0.3.4' * package encoding: UTF-8 * checking CRAN incoming feasibility ... [14s] NOTE Maintainer: 'Edward Burn ' Unknown, possibly misspelled, fields in DESCRIPTION: 'Remotes' * checking package namespace information ... OK * checking package dependencies ... OK * checking if this is a source package ... OK * checking if there is a namespace ... OK * checking for hidden files and directories ... OK * checking for portable file names ... OK * checking whether package 'CohortConstructor' can be installed ... OK * checking installed package size ... OK * checking package directory ... OK * checking for future file timestamps ... OK * checking 'build' directory ... OK * checking DESCRIPTION meta-information ... OK * checking top-level files ... OK * checking for left-over files ... OK * checking index information ... OK * checking package subdirectories ... OK * checking code files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * checking whether the package can be loaded ... OK * checking whether the package can be loaded with stated dependencies ... OK * checking whether the package can be unloaded cleanly ... OK * checking whether the namespace can be loaded with stated dependencies ... OK * checking whether the namespace can be unloaded cleanly ... OK * checking loading without being on the library search path ... OK * checking use of S3 registration ... OK * checking dependencies in R code ... OK * checking S3 generic/method consistency ... OK * checking replacement functions ... OK * checking foreign function calls ... OK * checking R code for possible problems ... [15s] NOTE extendOverlap: no visible binding for global variable 'record_id' extendOverlap: no visible binding for global variable 'record_id_overlap' extendOverlap: no visible binding for global variable 'cohort_start_date' extendOverlap: no visible binding for global variable 'cohort_end_date_overlap' extendOverlap: no visible binding for global variable 'cohort_end_date' extendOverlap: no visible binding for global variable 'cohort_start_date_overlap' Undefined global functions or variables: cohort_end_date cohort_end_date_overlap cohort_start_date cohort_start_date_overlap record_id record_id_overlap * checking Rd files ... OK * checking Rd metadata ... OK * checking Rd line widths ... OK * checking Rd cross-references ... OK * checking for missing documentation entries ... OK * checking for code/documentation mismatches ... OK * checking Rd \usage sections ... OK * checking Rd contents ... OK * checking for unstated dependencies in examples ... OK * checking contents of 'data' directory ... OK * checking data for non-ASCII characters ... OK * checking LazyData ... OK * checking data for ASCII and uncompressed saves ... OK * checking R/sysdata.rda ... OK * checking installed files from 'inst/doc' ... OK * checking files in 'vignettes' ... OK * checking examples ... OK * checking for unstated dependencies in 'tests' ... OK * checking tests ... [91s] ERROR Running 'testthat.R' [91s] 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(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 * checking for unstated dependencies in vignettes ... OK * checking package vignettes ... OK * checking re-building of vignette outputs ... [393s] OK * checking PDF version of manual ... [23s] OK * checking HTML version of manual ... [11s] OK * DONE Status: 1 ERROR, 2 NOTEs