Running ‘testthat.R’ [7s/9s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(UKB.COVID19)
  > 
  > test_check("UKB.COVID19")
  [1] "726 participants got tested until 2020-12-31."
  [1] "150 participants got positive test results until 2020-12-31."
  [1] "There are 10 deaths with COVID-19. 9 of them primary death cause is COVID-19."
  [1] "50 patients admitted to hospital were diagnosed as COVID-19 until 2020-12-31."
  [1] "32 patients' primary diagnosis is COVID-19."
  [1] "1 patients in hospitalization with COVID-19 diagnosis but show negative in the result file. Modified their test results."
  [1] "There are 151 COVID-19 patients identified. 32 individuals are admitted to hospital. 3 had been in ICU. 1 had been in advanced ICU."
  [1] "Outputting file: /home/hornik/tmp/R.check/r-devel-gcc/Work/build/Packages/UKB.COVID19/extdata/results/phenotype.txt"
  [1] "Reading in Withdrawn IDs from /home/hornik/tmp/R.check/r-devel-gcc/Work/build/Packages/UKB.COVID19/extdata/sim_withdrawn.csv.gz"
  [1] "Reading in Sample QC info from /home/hornik/tmp/R.check/r-devel-gcc/Work/build/Packages/UKB.COVID19/extdata/sim_ukb.tab.gz"
  [1] "Outputting lists to /home/hornik/tmp/R.check/r-devel-gcc/Work/build/Packages/UKB.COVID19/extdata/results"
  [1] "Reading in SNP MAF INFO data from /home/hornik/tmp/R.check/r-devel-gcc/Work/build/Packages/UKB.COVID19/extdata/alleleFreqs/ukb_mfi_chr*_v3.txt"
  [1] "writing list of variants to include under different filters to /home/hornik/tmp/R.check/r-devel-gcc/Work/build/Packages/UKB.COVID19/extdata/results"
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error (test_asso.R:2:1): (code run outside of `test_that()`) ────────────────
  Error: cannot open the connection
  Backtrace:
      █
   1. └─UKB.COVID19::risk.factor(...) test_asso.R:2:0
   2.   └─utils::write.table(...)
   3.     └─base::file(file, ifelse(append, "a", "w"))
  ── Error (test_comorbidity.R:2:1): (code run outside of `test_that()`) ─────────
  Error: cannot open the connection
  Backtrace:
      █
   1. └─UKB.COVID19::comorbidity.summary(...) test_comorbidity.R:2:0
   2.   └─utils::write.table(cov, outfile, row.names = F, quote = F, sep = "\t")
   3.     └─base::file(file, ifelse(append, "a", "w"))
  ── Error (test_makeGWASFiles.R:1:1): (code run outside of `test_that()`) ───────
  Error: cannot open the connection
  Backtrace:
      █
   1. └─UKB.COVID19::risk.factor(...) test_makeGWASFiles.R:1:0
   2.   └─utils::write.table(...)
   3.     └─base::file(file, ifelse(append, "a", "w"))
  ── Error (test_makePhenotypes.R:2:1): (code run outside of `test_that()`) ──────
  Error: cannot open the connection
  Backtrace:
      █
   1. └─UKB.COVID19::makePhenotypes(...) test_makePhenotypes.R:2:0
   2.   └─utils::write.table(...)
   3.     └─base::file(file, ifelse(append, "a", "w"))
  ── Error (test_risk_factor.R:2:1): (code run outside of `test_that()`) ─────────
  Error: cannot open the connection
  Backtrace:
      █
   1. └─UKB.COVID19::risk.factor(...) test_risk_factor.R:2:0
   2.   └─utils::write.table(...)
   3.     └─base::file(file, ifelse(append, "a", "w"))
  ── Error (test_sampleQC.R:2:1): (code run outside of `test_that()`) ────────────
  Error: cannot open the connection
  Backtrace:
      █
   1. └─UKB.COVID19::sampleQC(...) test_sampleQC.R:2:0
   2.   └─utils::write.table(...)
   3.     └─base::file(file, ifelse(append, "a", "w"))
  ── Error (test_variantQC.R:2:1): (code run outside of `test_that()`) ───────────
  Error: cannot open the connection
  Backtrace:
      █
   1. └─UKB.COVID19::variantQC(...) test_variantQC.R:2:0
   2.   └─utils::write.table(...)
   3.     └─base::file(file, ifelse(append, "a", "w"))
  
  [ FAIL 7 | WARN 7 | SKIP 0 | PASS 0 ]
  Error: Test failures
  Execution halted