Running ‘testthat.R’ [34s/31s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > test_check("prewas")
  Loading required package: prewas
  [1] "Start building tree"
  optimize edge weights:  -2420.974 --> -2415.557 
  optimize base frequencies:  -2415.557 --> -2415.352 
  optimize rate matrix:  -2415.352 --> -2413.979 
  optimize edge weights:  -2413.979 --> -2413.974 
  optimize topology:  -2413.974 --> -2413.974 
  0 
  [1] "Ratchet iteration  1 , best pscore so far: -2413.97385163831"
  [1] "Ratchet iteration  2 , best pscore so far: -2413.97385163831"
  [1] "Ratchet iteration  3 , best pscore so far: -2413.97385163831"
  [1] "Ratchet iteration  4 , best pscore so far: -2413.97385163831"
  [1] "Ratchet iteration  5 , best pscore so far: -2413.97385163831"
  [1] "Ratchet iteration  6 , best pscore so far: -2413.97385163831"
  [1] "Ratchet iteration  7 , best pscore so far: -2413.97385163831"
  [1] "Ratchet iteration  8 , best pscore so far: -2413.97385163831"
  [1] "Ratchet iteration  9 , best pscore so far: -2413.97385163831"
  [1] "Ratchet iteration  10 , best pscore so far: -2413.97385163831"
  [1] "Ratchet iteration  11 , best pscore so far: -2413.97385163831"
  [1] "Ratchet iteration  12 , best pscore so far: -2413.97385163831"
  [1] "Ratchet iteration  13 , best pscore so far: -2413.97385163831"
  [1] "Ratchet iteration  14 , best pscore so far: -2413.97385163831"
  [1] "Ratchet iteration  15 , best pscore so far: -2413.97385163831"
  [1] "Ratchet iteration  16 , best pscore so far: -2413.97385163831"
  [1] "Ratchet iteration  17 , best pscore so far: -2413.97385163831"
  [1] "Ratchet iteration  18 , best pscore so far: -2413.97385163831"
  [1] "Ratchet iteration  19 , best pscore so far: -2413.97385163831"
  [1] "Ratchet iteration  20 , best pscore so far: -2413.97385163831"
  optimize base frequencies:  -2413.974 --> -2413.742 
  optimize rate matrix:  -2413.742 --> -2413.699 
  optimize edge weights:  -2413.699 --> -2413.699 
  optimize topology:  -2413.699 --> -2413.699 
  0 
  optimize base frequencies:  -2413.699 --> -2413.692 
  optimize rate matrix:  -2413.692 --> -2413.691 
  optimize edge weights:  -2413.691 --> -2413.691 
  optimize base frequencies:  -2413.691 --> -2413.691 
  optimize rate matrix:  -2413.691 --> -2413.691 
  optimize edge weights:  -2413.691 --> -2413.691 
  optimize base frequencies:  -2413.691 --> -2413.691 
  optimize rate matrix:  -2413.691 --> -2413.691 
  optimize edge weights:  -2413.691 --> -2413.691 
  [1] "Finished building tree"
  ── 1. Error: prewas() gives expected output when given valid input (@test-prewas
  Input must be a factor
  Backtrace:
   1. prewas::prewas(...)
   2. prewas:::remove_unknown_alleles(...)
   3. prewas:::check_is_this_class(alleles, "factor")
  
  ── 2. Error: prewas() gives a warning when given an outgroup not found in the tr
  Input must be a factor
  Backtrace:
   1. testthat::expect_warning(...)
   6. prewas::prewas(dna = prewas::vcf, tree = prewas::tree, outgroup = "foo")
   7. prewas:::remove_unknown_alleles(...)
   8. prewas:::check_is_this_class(alleles, "factor")
  
  ── 3. Error: make_binary_matrix performs as expected when given valid input (@te
  Input must be a factor
  Backtrace:
   1. prewas:::make_binary_matrix(allele_mat_split, alleles)
   2. prewas:::check_is_this_class(reference_allele, "factor")
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  [ OK: 219 | SKIPPED: 0 | WARNINGS: 0 | FAILED: 3 ]
  1. Error: prewas() gives expected output when given valid input (@test-prewas.R#4) 
  2. Error: prewas() gives a warning when given an outgroup not found in the tree (@test-prewas.R#34) 
  3. Error: make_binary_matrix performs as expected when given valid input (@test-reference_alleles.R#114) 
  
  Error: testthat unit tests failed
  Execution halted