Running 'testthat.R' [11s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(rprev)
  Loading required package: survival
  > 
  > test_check("rprev")
  -- 1. Failure: test_prevalence_fit returns same values as before without error a
  test_prevalence_fit(prevalence_object) has changed from known value recorded in 'cache/diagnostics/prev_pval.rds'.
  1/1 mismatches
  [1] 0.45 - 0.779 == -0.329
  
  -- 2. Failure: prevalence outputs the same values as before (@test_prevalence.R#
  as.numeric(unlist(wei_nonstrat$estimates)) not equal to c(755.5).
  1/1 mismatches
  [1] 764 - 756 == 8.7
  
  -- 3. Failure: prevalence outputs the same values as before (@test_prevalence.R#
  as.numeric(unlist(wei_strat$estimates)) not equal to c(769.9).
  1/1 mismatches
  [1] 756 - 770 == -13.6
  
  -- 4. Failure: prevalence outputs the same values as before (@test_prevalence.R#
  as.numeric(unlist(wei_agesex$estimates)) not equal to c(768.2).
  1/1 mismatches
  [1] 769 - 768 == 0.5
  
  -- 5. Failure: prevalence outputs the same values as before (@test_prevalence.R#
  as.numeric(unlist(lnorm_age$estimates)) not equal to c(742.2).
  1/1 mismatches
  [1] 739 - 742 == -3
  
  -- 6. Failure: prevalence outputs the same values as before (@test_prevalence.R#
  as.numeric(unlist(lnorm_sex$estimates)) not equal to c(630.4).
  1/1 mismatches
  [1] 614 - 630 == -16.2
  
  -- 7. Failure: prevalence outputs the same values as before (@test_prevalence.R#
  as.numeric(unlist(exp_full$estimates)) not equal to c(566.85).
  1/1 mismatches
  [1] 569 - 567 == 2.1
  
  -- 8. Failure: prevalence outputs the same values as before (@test_prevalence.R#
  as.numeric(unlist(exp_sex$estimates)) not equal to c(566.87).
  1/1 mismatches
  [1] 564 - 567 == -3.2
  
  -- 9. Failure: prevalence outputs the same values as before (@test_prevalence.R#
  nrow(wei_nonstrat$simulated) not equal to 20019.
  1/1 mismatches
  [1] 19998 - 20019 == -21
  
  -- 10. Failure: prevalence outputs the same values as before (@test_prevalence.R
  nrow(wei_strat$simulated) not equal to 19767.
  1/1 mismatches
  [1] 19771 - 19767 == 4
  
  -- 11. Failure: prevalence outputs the same values as before (@test_prevalence.R
  nrow(wei_agesex$simulated) not equal to 19889.
  1/1 mismatches
  [1] 20085 - 19889 == 196
  
  -- 12. Failure: prevalence outputs the same values as before (@test_prevalence.R
  nrow(lnorm_age$simulated) not equal to 17066.
  1/1 mismatches
  [1] 16927 - 17066 == -139
  
  -- 13. Failure: prevalence outputs the same values as before (@test_prevalence.R
  nrow(lnorm_sex$simulated) not equal to 6306.
  1/1 mismatches
  [1] 6361 - 6306 == 55
  
  -- 14. Failure: prevalence outputs the same values as before (@test_prevalence.R
  nrow(exp_full$simulated) not equal to 25928.
  1/1 mismatches
  [1] 25907 - 25928 == -21
  
  -- 15. Failure: prevalence outputs the same values as before (@test_prevalence.R
  nrow(exp_sex$simulated) not equal to 19333.
  1/1 mismatches
  [1] 19237 - 19333 == -96
  
  -- 16. Failure: prevalence outputs the same values as before (@test_prevalence.R
  round(wei_nonstrat$pval, 3) not equal to 0.431.
  1/1 mismatches
  [1] 0.594 - 0.431 == 0.163
  
  -- 17. Failure: prevalence outputs the same values as before (@test_prevalence.R
  round(wei_strat$pval, 3) not equal to 0.282.
  1/1 mismatches
  [1] 0.312 - 0.282 == 0.03
  
  -- 18. Failure: prevalence outputs the same values as before (@test_prevalence.R
  round(wei_agesex$pval, 3) not equal to 0.312.
  1/1 mismatches
  [1] 0.377 - 0.312 == 0.065
  
  -- 19. Failure: prevalence outputs the same values as before (@test_prevalence.R
  round(lnorm_age$pval, 3) not equal to 0.594.
  1/1 mismatches
  [1] 0.45 - 0.594 == -0.144
  
  -- 20. Failure: prevalence outputs the same values as before (@test_prevalence.R
  round(lnorm_sex$pval, 3) not equal to 0.216.
  1/1 mismatches
  [1] 0.45 - 0.216 == 0.234
  
  -- 21. Failure: prevalence outputs the same values as before (@test_prevalence.R
  round(exp_full$pval, 3) not equal to 0.469.
  1/1 mismatches
  [1] 0.377 - 0.469 == -0.092
  
  -- 22. Failure: prevalence outputs the same values as before (@test_prevalence.R
  round(exp_sex$pval, 3) not equal to 0.254.
  1/1 mismatches
  [1] 0.297 - 0.254 == 0.043
  
  == testthat results  ===========================================================
  OK: 126 SKIPPED: 0 FAILED: 22
  1. Failure: test_prevalence_fit returns same values as before without error and isn't significant (@test_diagnostics.R#46) 
  2. Failure: prevalence outputs the same values as before (@test_prevalence.R#78) 
  3. Failure: prevalence outputs the same values as before (@test_prevalence.R#79) 
  4. Failure: prevalence outputs the same values as before (@test_prevalence.R#80) 
  5. Failure: prevalence outputs the same values as before (@test_prevalence.R#81) 
  6. Failure: prevalence outputs the same values as before (@test_prevalence.R#82) 
  7. Failure: prevalence outputs the same values as before (@test_prevalence.R#83) 
  8. Failure: prevalence outputs the same values as before (@test_prevalence.R#84) 
  9. Failure: prevalence outputs the same values as before (@test_prevalence.R#87) 
  1. ...
  
  Error: testthat unit tests failed
  Execution halted