Running ‘testthat.R’ [236s/304s]
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/testing-design.html#sec-tests-files-overview
  > # * https://testthat.r-lib.org/articles/special-files.html
  > 
  > library(testthat)
  > library(cancerradarr)
  > 
  > test_check("cancerradarr")
  
  
  processing file: static_report.Rmd
  
  > input_file_test.xlsx has been created, please fill it with cancer registry data
  > Reading /home/hornik/tmp/R.check/r-devel-gcc/Work/build/Packages/cancerradarr/extdata/ex_cancerRADAR_input_filled.xlsx
  > Reference population aggregation
  custom aggregation ==========>--------------------   33% |  ETA:  4s
  
  > Aggregation level: un_region
  	- Data aggregation..
  custom aggregation =>-----------------------------    2% |  ETA:  1m
  custom aggregation ===>---------------------------   10% |  ETA: 34s
  custom aggregation ======>------------------------   21% |  ETA: 26s
  custom aggregation ============>------------------   39% |  ETA: 16s
  custom aggregation ===============>---------------   50% |  ETA: 13s
  custom aggregation ==================>------------   58% |  ETA: 11s
  custom aggregation ========================>------   79% |  ETA:  5s
  custom aggregation ========================>------   80% |  ETA:  6s
  custom aggregation ==========================>----   88% |  ETA:  4s
  
  	- Incidence rates (ir)..
  	- Proportional rates (pr)..
  	- Crude incidence rates (cir)..
  	- Age-standardized incidence rate (asir)..
  	- Crude incidence rates ratio (cirr)..
  	- Age-standardized incidence rates ratio (asirr)..
  	- Crude incidence rates difference (cird)..
  	- Age-standardized incidence rates difference (asird)..
  	- Indirect standardized incidence ratio (sir)..
  	- Proportional incidence ratio (pir)..
  	- Total number of cancer..
  > Aggregation level: un_subregion
  	- Data aggregation..
  custom aggregation ==>----------------------------    6% |  ETA: 30s
  custom aggregation ==>----------------------------    7% |  ETA:  1m
  custom aggregation ===>---------------------------   10% |  ETA:  1m
  custom aggregation ====>--------------------------   12% |  ETA:  1m
  custom aggregation =====>-------------------------   17% |  ETA:  1m
  custom aggregation ======>------------------------   20% |  ETA:  1m
  custom aggregation =======>-----------------------   24% |  ETA:  1m
  custom aggregation ========>----------------------   28% |  ETA:  1m
  custom aggregation =========>---------------------   30% |  ETA:  1m
  custom aggregation ==========>--------------------   33% |  ETA:  1m
  custom aggregation ============>------------------   41% |  ETA: 46s
  custom aggregation ==============>----------------   48% |  ETA: 38s
  custom aggregation ===============>---------------   51% |  ETA: 36s
  custom aggregation ================>--------------   53% |  ETA: 36s
  custom aggregation =================>-------------   57% |  ETA: 33s
  custom aggregation ==================>------------   60% |  ETA: 31s
  custom aggregation ====================>----------   67% |  ETA: 25s
  custom aggregation =====================>---------   70% |  ETA: 22s
  custom aggregation ======================>--------   74% |  ETA: 20s
  custom aggregation =======================>-------   78% |  ETA: 17s
  custom aggregation =========================>-----   83% |  ETA: 13s
  custom aggregation ===========================>---   91% |  ETA:  6s
  custom aggregation ============================>--   94% |  ETA:  4s
  custom aggregation =============================>-   98% |  ETA:  2s
  
  	- Incidence rates (ir)..
  	- Proportional rates (pr)..
  	- Crude incidence rates (cir)..
  	- Age-standardized incidence rate (asir)..
  	- Crude incidence rates ratio (cirr)..
  	- Age-standardized incidence rates ratio (asirr)..
  	- Crude incidence rates difference (cird)..
  	- Age-standardized incidence rates difference (asird)..
  	- Indirect standardized incidence ratio (sir)..
  	- Proportional incidence ratio (pir)..
  	- Total number of cancer..
  > Aggregation level: hdi_cat
  	- Data aggregation..
  custom aggregation ======>------------------------   20% |  ETA: 15s
  custom aggregation =========>---------------------   29% |  ETA: 18s
  custom aggregation ================>--------------   54% |  ETA:  9s
  custom aggregation ===================>-----------   64% |  ETA:  7s
  custom aggregation ========================>------   80% |  ETA:  4s
  custom aggregation ============================>--   94% |  ETA:  1s
  
  	- Incidence rates (ir)..
  	- Proportional rates (pr)..
  	- Crude incidence rates (cir)..
  	- Age-standardized incidence rate (asir)..
  	- Crude incidence rates ratio (cirr)..
  	- Age-standardized incidence rates ratio (asirr)..
  	- Crude incidence rates difference (cird)..
  	- Age-standardized incidence rates difference (asird)..
  	- Indirect standardized incidence ratio (sir)..
  	- Proportional incidence ratio (pir)..
  	- Total number of cancer..
  > Aggregation level: any_migr
  	- Data aggregation..
  custom aggregation ============================>--   92% |  ETA:  0s
  
  	- Incidence rates (ir)..
  	- Proportional rates (pr)..
  	- Crude incidence rates (cir)..
  	- Age-standardized incidence rate (asir)..
  	- Crude incidence rates ratio (cirr)..
  	- Age-standardized incidence rates ratio (asirr)..
  	- Crude incidence rates difference (cird)..
  	- Age-standardized incidence rates difference (asird)..
  	- Indirect standardized incidence ratio (sir)..
  	- Proportional incidence ratio (pir)..
  	- Total number of cancer..
  > Aggregation level: asr_rank_cat
  	- Data aggregation..
  custom aggregation ===>---------------------------   10% |  ETA: 17s
  custom aggregation =======>-----------------------   24% |  ETA: 14s
  custom aggregation ===========>-------------------   38% |  ETA: 13s
  custom aggregation ===============>---------------   51% |  ETA: 10s
  
  	- Incidence rates (ir)..
  	- Proportional rates (pr)..
  	- Crude incidence rates (cir)..
  	- Age-standardized incidence rate (asir)..
  	- Crude incidence rates ratio (cirr)..
  	- Age-standardized incidence rates ratio (asirr)..
  	- Crude incidence rates difference (cird)..
  	- Age-standardized incidence rates difference (asird)..
  	- Indirect standardized incidence ratio (sir)..
  	- Proportional incidence ratio (pir)..
  	- Total number of cancer..
  
  > /tmp/Rtmpy20dWx/filee091b59b0aac.xlsx created!
  
  
  processing file: static_report.Rmd
  [ FAIL 2 | WARN 2 | SKIP 0 | PASS 263 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-create_static_report.R:35:5'): create_static_report works with example output file ──
  Error in `file(con, "w")`: cannot open the connection
  Backtrace:
      ▆
   1. └─cancerradarr::create_static_report(temp_file) at test-create_static_report.R:35:5
   2.   └─rmarkdown::render(...)
   3.     └─knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)
   4.       └─xfun::write_utf8(res, output)
   5.         └─base::writeLines(enc2utf8(text), con, ..., useBytes = TRUE)
   6.           └─base::file(con, "w")
  ── Error ('test_cancerradarr.R:38:3'): Output file creation ────────────────────
  Error in `file(con, "w")`: cannot open the connection
  Backtrace:
      ▆
   1. └─cancerradarr::create_static_report(file.out) at test_cancerradarr.R:38:3
   2.   └─rmarkdown::render(...)
   3.     └─knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)
   4.       └─xfun::write_utf8(res, output)
   5.         └─base::writeLines(enc2utf8(text), con, ..., useBytes = TRUE)
   6.           └─base::file(con, "w")
  
  [ FAIL 2 | WARN 2 | SKIP 0 | PASS 263 ]
  Error: Test failures
  Execution halted