* using log directory ‘/srv/hornik/tmp/CRAN/DrugUtilisation.Rcheck’ * using R Under development (unstable) (2024-02-08 r85876) * using platform: x86_64-pc-linux-gnu * R was compiled by Debian clang version 17.0.6 (5) Debian flang-new version 17.0.6 (5) * running under: Debian GNU/Linux trixie/sid * using session charset: UTF-8 * checking for file ‘DrugUtilisation/DESCRIPTION’ ... OK * this is package ‘DrugUtilisation’ version ‘0.5.0’ * package encoding: UTF-8 * checking CRAN incoming feasibility ... [4s/6s] Note_to_CRAN_maintainers Maintainer: ‘Marti Catala ’ * 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 executable files ... OK * checking for hidden files and directories ... OK * checking for portable file names ... OK * checking for sufficient/correct file permissions ... OK * checking serialization versions ... OK * checking whether package ‘DrugUtilisation’ can be installed ... [4s/4s] 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 R files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * checking whether the package can be loaded ... [1s/1s] OK * checking whether the package can be loaded with stated dependencies ... [1s/1s] OK * checking whether the package can be unloaded cleanly ... [1s/1s] OK * checking whether the namespace can be loaded with stated dependencies ... [1s/1s] OK * checking whether the namespace can be unloaded cleanly ... [1s/1s] OK * checking loading without being on the library search path ... [1s/1s] 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 ... [6s/6s] OK * checking Rd files ... [0s/0s] 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 ... [0s/0s] 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 ... [1s/1s] OK * checking for unstated dependencies in ‘tests’ ... OK * checking tests ... [171s/115s] ERROR Running ‘testthat.R’ [170s/115s] 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(DrugUtilisation) > > test_check("DrugUtilisation") Starting 2 test processes [ FAIL 4 | WARN 6 | SKIP 19 | PASS 46 ] ══ Skipped tests (19) ══════════════════════════════════════════════════════════ • On CRAN (19): 'test-benchmarkDUS.R:2:3', 'test-dailyDose.R:2:3', 'test-generateDrugUtilisationCohortSet.R:48:3', 'test-generateDrugUtilisationCohortSet.R:147:3', 'test-generateDrugUtilisationCohortSet.R:203:3', 'test-generateDrugUtilisationCohortSet.R:253:3', 'test-generateDrugUtilisationCohortSet.R:349:3', 'test-indication.R:3:3', 'test-indication.R:185:3', 'test-indication.R:339:3', 'test-indication.R:464:3', 'test-drugUse.R:2:3', 'test-drugUse.R:40:3', 'test-drugUse.R:254:3', 'test-drugUse.R:455:3', 'test-drugUse.R:597:3', 'test-drugUse.R:847:3', 'test-drugUse.R:868:3', 'test-drugUse.R:914:3' ══ Failed tests ════════════════════════════════════════════════════════════════ ── Error ('test-indication.R:598:3'): summariseIndication ────────────────────── Error in `dplyr::mutate(PatientProfiles::summariseResult(table = cohort, group = list("cohort_name"), includeOverallGroup = FALSE, includeOverallStrata = TRUE, strata = strata, variables = indicationVariables, functions = c("count", "percentage")) %>% PatientProfiles::addCdmName(cdm = cdm), variable_level = dplyr::if_else(substr(.data$variable_name, 1, 15) == "indication_gap_", lapply(strsplit(.data$variable_name, "_"), function(x) { if (length(x) > 3) { x <- paste0(x[-c(1:3)], collapse = "_") x <- paste0(toupper(substr(x, 1, 1)), substr(x, 2, nchar(x))) } else { x <- as.character(NA) } return(x) }) %>% unlist(), as.character(NA)), variable_name = dplyr::if_else(substr(.data$variable_name, 1, 15) == "indication_gap_", lapply(strsplit(.data$variable_name, "_"), function(x) { x <- paste0(x[1:min(3, length(x))], collapse = "_") x <- indicationColumnName(x) }) %>% unlist(), .data$variable_name), result_type = "summarised_indication", package_name = "DrugUtilisation", package_version = as.character(utils::packageVersion("Drugutilisation")))`: i In argument: `package_version = as.character(utils::packageVersion("Drugutilisation"))`. Caused by error in `utils::packageVersion()`: ! there is no package called 'Drugutilisation' Backtrace: ▆ 1. ├─DrugUtilisation::summariseIndication(res) at test-indication.R:598:3 2. │ ├─omopgenerics::suppress(...) 3. │ ├─omopgenerics::newSummarisedResult(...) 4. │ │ └─omopgenerics:::assertClass(x, "data.frame") 5. │ │ ├─base::paste0(...) 6. │ │ └─base::paste0(base::class(x), collapse = ", ") 7. │ ├─dplyr::mutate(...) 8. │ └─dplyr:::mutate.data.frame(...) 9. │ └─dplyr:::mutate_cols(.data, dplyr_quosures(...), by) 10. │ ├─base::withCallingHandlers(...) 11. │ └─dplyr:::mutate_col(dots[[i]], data, mask, new_columns) 12. │ └─mask$eval_all_mutate(quo) 13. │ └─dplyr (local) eval() 14. ├─utils::packageVersion("Drugutilisation") 15. │ └─base::stop(packageNotFoundError(pkg, lib.loc, sys.call())) 16. └─dplyr (local) ``(``) 17. └─rlang::abort(message, class = error_class, parent = parent, call = error_call) ── Error ('test-drugUse.R:984:5'): check all estimates ───────────────────────── Error in `dplyr::mutate(., cdm_name = dplyr::coalesce(omopgenerics::cdmName(cdm), as.character(NA)), result_type = "summarised_drug_use", package_name = "DrugUtilisation", package_version = as.character(utils::packageVersion("Drugutilisation")))`: i In argument: `package_version = as.character(utils::packageVersion("Drugutilisation"))`. Caused by error in `utils::packageVersion()`: ! there is no package called 'Drugutilisation' Backtrace: ▆ 1. ├─... %>% dplyr::filter(.data$group_name == "cohort_name") at test-drugUse.R:984:5 2. ├─dplyr::filter(., .data$group_name == "cohort_name") 3. ├─DrugUtilisation::summariseDrugUse(cdm[["dose_table"]], drugUseEstimates = all_estimates[k]) 4. │ ├─omopgenerics::suppress(...) 5. │ ├─omopgenerics::newSummarisedResult(...) 6. │ │ └─omopgenerics:::assertClass(x, "data.frame") 7. │ │ ├─base::paste0(...) 8. │ │ └─base::paste0(base::class(x), collapse = ", ") 9. │ └─... %>% ... 10. ├─dplyr::mutate(...) 11. ├─dplyr:::mutate.data.frame(...) 12. │ └─dplyr:::mutate_cols(.data, dplyr_quosures(...), by) 13. │ ├─base::withCallingHandlers(...) 14. │ └─dplyr:::mutate_col(dots[[i]], data, mask, new_columns) 15. │ └─mask$eval_all_mutate(quo) 16. │ └─dplyr (local) eval() 17. ├─utils::packageVersion("Drugutilisation") 18. │ └─base::stop(packageNotFoundError(pkg, lib.loc, sys.call())) 19. └─dplyr (local) ``(``) 20. └─rlang::abort(message, class = error_class, parent = parent, call = error_call) ── Failure ('test-drugUse.R:1022:3'): check all variables ────────────────────── Expected `.` to run without any errors. i Actually got a with text: i In argument: `package_version = as.character(utils::packageVersion("Drugutilisation"))`. Caused by error in `utils::packageVersion()`: ! there is no package called 'Drugutilisation' Backtrace: ▆ 1. ├─... %>% expect_no_error() at test-drugUse.R:1022:3 2. └─testthat::expect_no_error(.) ── Failure ('test-drugUse.R:1026:3'): check all variables ────────────────────── all(...) is not TRUE `actual`: FALSE `expected`: TRUE [ FAIL 4 | WARN 6 | SKIP 19 | PASS 46 ] Error: Test failures Execution halted * checking for unstated dependencies in vignettes ... OK * checking package vignettes ... OK * checking re-building of vignette outputs ... [228s/198s] ERROR Error(s) in re-building vignettes: ... --- re-building ‘addDrugUse.Rmd’ using rmarkdown Quitting from lines 351-359 [unnamed-chunk-21] (addDrugUse.Rmd) Error: processing vignette 'addDrugUse.Rmd' failed with diagnostics: ℹ In argument: `package_version = as.character(utils::packageVersion("Drugutilisation"))`. Caused by error in `utils::packageVersion()`: ! there is no package called 'Drugutilisation' --- failed re-building ‘addDrugUse.Rmd’ Warning: Connection is garbage-collected, use dbDisconnect() to avoid this. Warning: Database is garbage-collected, use dbDisconnect(con, shutdown=TRUE) or duckdb::duckdb_shutdown(drv) to avoid this. --- re-building ‘addIndications-example.Rmd’ using rmarkdown trying URL 'https://example-data.ohdsi.dev/GiBleed.zip' Content type 'application/zip' length 6754786 bytes (6.4 MB) ================================================== downloaded 6.4 MB Warning: Database is garbage-collected, use dbDisconnect(con, shutdown=TRUE) or duckdb::duckdb_shutdown(drv) to avoid this. Quitting from lines 120-131 [unnamed-chunk-6] (addIndications-example.Rmd) Error: processing vignette 'addIndications-example.Rmd' failed with diagnostics: ℹ In argument: `package_version = as.character(utils::packageVersion("Drugutilisation"))`. Caused by error in `utils::packageVersion()`: ! there is no package called 'Drugutilisation' --- failed re-building ‘addIndications-example.Rmd’ Warning: Connection is garbage-collected, use dbDisconnect() to avoid this. Warning: Database is garbage-collected, use dbDisconnect(con, shutdown=TRUE) or duckdb::duckdb_shutdown(drv) to avoid this. --- re-building ‘introCreateCohort.Rmd’ using rmarkdown --- finished re-building ‘introCreateCohort.Rmd’ --- re-building ‘routePatternDose.Rmd’ using rmarkdown --- finished re-building ‘routePatternDose.Rmd’ Warning: Connection is garbage-collected, use dbDisconnect() to avoid this. Warning: Database is garbage-collected, use dbDisconnect(con, shutdown=TRUE) or duckdb::duckdb_shutdown(drv) to avoid this. SUMMARY: processing the following files failed: ‘addDrugUse.Rmd’ ‘addIndications-example.Rmd’ Error: Vignette re-building failed. Execution halted * checking PDF version of manual ... [3s/3s] OK * checking HTML version of manual ... [0s/0s] OK * checking for non-standard things in the check directory ... OK * checking for detritus in the temp directory ... OK * DONE Status: 2 ERRORs