Running ‘testthat.R’ [73s/91s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > test_check("rehh")
  Loading required package: rehh
  ── 1. Error: checked_data2haplohh (@test_data2haplohh.R#28)  ───────────────────
  Package 'vcfR' needed to read vcf files. Conversion stopped.
  Backtrace:
   1. rehh::data2haplohh(hap_file = "bta12_cgu.vcf.gz", polarize_vcf = FALSE)
   2. rehh:::read.vcf(...)
  
  ── 2. Failure: errors_vcf (@test_error_messages.R#142)  ────────────────────────
  `data2haplohh(tmp)` threw an error with unexpected message.
  Expected match: "No key 'AA' found in INFO field of vcf file"
  Actual message: "Package 'vcfR' needed to read vcf files. Conversion stopped."
  Backtrace:
   1. testthat::expect_error(data2haplohh(tmp), "No key 'AA' found in INFO field of vcf file")
   6. rehh::data2haplohh(tmp)
   7. rehh:::read.vcf(...)
  
  ── 3. Failure: errors_vcf (@test_error_messages.R#144)  ────────────────────────
  `data2haplohh(tmp, polarize_vcf = FALSE)` threw an error with unexpected message.
  Expected match: "1 individuals have different ploidy at different markers."
  Actual message: "Package 'vcfR' needed to read vcf files. Conversion stopped."
  Backtrace:
   1. testthat::expect_error(...)
   6. rehh::data2haplohh(tmp, polarize_vcf = FALSE)
   7. rehh:::read.vcf(...)
  
  ── 4. Error: errors_vcf (@test_error_messages.R#161)  ──────────────────────────
  Package 'vcfR' needed to read vcf files. Conversion stopped.
  Backtrace:
    1. testthat::expect_output(...)
   10. rehh::data2haplohh(tmp, polarize_vcf = FALSE)
   11. rehh:::read.vcf(...)
  
  ── 5. Error: compare_example_formats (@test_examples.R#119)  ───────────────────
  Package 'vcfR' needed to read vcf files. Conversion stopped.
  Backtrace:
   1. rehh::data2haplohh(...)
   2. rehh:::read.vcf(...)
  
  ── 6. Error: checked_unpolarized (@test_examples.R#598)  ───────────────────────
  Package 'vcfR' needed to read vcf files. Conversion stopped.
  Backtrace:
   1. rehh::data2haplohh(...)
   2. rehh:::read.vcf(...)
  
  ── 7. Error: checked_limhaplo (@test_examples.R#634)  ──────────────────────────
  Package 'vcfR' needed to read vcf files. Conversion stopped.
  Backtrace:
   1. rehh::data2haplohh(...)
   2. rehh:::read.vcf(...)
  
  ── 8. Error: checked_newick (@test_examples.R#676)  ────────────────────────────
  Package 'vcfR' needed to read vcf files. Conversion stopped.
  Backtrace:
   1. rehh::data2haplohh(...)
   2. rehh:::read.vcf(...)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  [ OK: 61 | SKIPPED: 0 | WARNINGS: 0 | FAILED: 8 ]
  1. Error: checked_data2haplohh (@test_data2haplohh.R#28) 
  2. Failure: errors_vcf (@test_error_messages.R#142) 
  3. Failure: errors_vcf (@test_error_messages.R#144) 
  4. Error: errors_vcf (@test_error_messages.R#161) 
  5. Error: compare_example_formats (@test_examples.R#119) 
  6. Error: checked_unpolarized (@test_examples.R#598) 
  7. Error: checked_limhaplo (@test_examples.R#634) 
  8. Error: checked_newick (@test_examples.R#676) 
  
  Error: testthat unit tests failed
  Execution halted