Running 'testthat.R' [33s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > test_check("prewas")
  Loading required package: prewas
  -- 1. Error: collapse_snps_into_genes_by_impact() behaves as expected when given
  subscript out of bounds
  Backtrace:
   1. testthat::expect_equal(...)
   4. base::unname(temp_gene_mat_list$gene_mat_moderate[2, , drop = TRUE])
  
  -- 2. Error: get_gene_mat_by_impact() behaves as expected when given valid input
  subscript out of bounds
  Backtrace:
   1. testthat::expect_equal(...)
   4. base::unname(gene_mat[2, , drop = TRUE])
  
  [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"
  == testthat results  ===========================================================
  [ OK: 314 | SKIPPED: 0 | WARNINGS: 0 | FAILED: 2 ]
  1. Error: collapse_snps_into_genes_by_impact() behaves as expected when given valid input (@test-collapse_snps_by_gene.R#115) 
  2. Error: get_gene_mat_by_impact() behaves as expected when given valid input (@test-collapse_snps_by_gene.R#263) 
  
  Error: testthat unit tests failed
  Execution halted