Running 'testthat.R' [10s/11s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > test_check("simITS")
  Loading required package: simITS
  Loading required package: dplyr
  
  Attaching package: 'dplyr'
  
  The following object is masked from 'package:testthat':
  
      matches
  
  The following objects are masked from 'package:stats':
  
      filter, lag
  
  The following objects are masked from 'package:base':
  
      intersect, setdiff, setequal, union
  
  Loading required package: rlang
  
  Attaching package: 'rlang'
  
  The following objects are masked from 'package:testthat':
  
      is_false, is_null, is_true
  
  -- 1. Error: Aggregation of simulation results works (@test-aggregate_simulation
  there is no package called 'tidyr'
  Backtrace:
    1. simITS::aggregate_simulation_results(mecklenberg, preds, "pbail")
    9. tidyr::nest(., data = c(month, Ybar, Ystar, Ysmooth))
   10. base::getExportedValue(pkg, name)
   11. base::asNamespace(ns)
   12. base::getNamespace(ns)
   13. base::loadNamespace(name)
   14. base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   15. base:::withOneRestart(expr, restarts[[1L]])
   16. base:::doWithOneRestart(return(expr), restart)
  
  -- 2. Error: Alternate function works for aggregation (@test-aggregate_simulatio
  there is no package called 'tidyr'
  Backtrace:
    1. simITS::aggregate_simulation_results(...)
    9. tidyr::nest(., data = c(month, Ybar, Ystar, Ysmooth))
   10. base::getExportedValue(pkg, name)
   11. base::asNamespace(ns)
   12. base::getNamespace(ns)
   13. base::loadNamespace(name)
   14. base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   15. base:::withOneRestart(expr, restarts[[1L]])
   16. base:::doWithOneRestart(return(expr), restart)
  
  -- 3. Error: The four types of smooth vs summarize calls work (@test-general_tes
  there is no package called 'tidyr'
  Backtrace:
    1. simITS::process_outcome_model(...)
    2. simITS::extrapolate_model(...)
   10. tidyr::nest(., data = c(month, Ybar, Ystar))
   11. base::getExportedValue(pkg, name)
   12. base::asNamespace(ns)
   13. base::getNamespace(ns)
   14. base::loadNamespace(name)
   15. base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   16. base:::withOneRestart(expr, restarts[[1L]])
   17. base:::doWithOneRestart(return(expr), restart)
  
  -- 4. Error: Smoothing with post.only=TRUE gives post smoothed only (@test-gener
  there is no package called 'tidyr'
  Backtrace:
    1. simITS::process_outcome_model(...)
    2. simITS::extrapolate_model(...)
   10. tidyr::nest(., data = c(month, Ybar, Ystar))
   11. base::getExportedValue(pkg, name)
   12. base::asNamespace(ns)
   13. base::getNamespace(ns)
   14. base::loadNamespace(name)
   15. base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   16. base:::withOneRestart(expr, restarts[[1L]])
   17. base:::doWithOneRestart(return(expr), restart)
  
  -- 5. Error: make_envelope_graph works (@test-make_envelope_graph.R#18)  -------
  there is no package called 'tidyr'
  Backtrace:
    1. simITS::process_outcome_model(...)
    2. simITS::extrapolate_model(...)
   10. tidyr::nest(., data = c(month, Ybar, Ystar))
   11. base::getExportedValue(pkg, name)
   12. base::asNamespace(ns)
   13. base::getNamespace(ns)
   14. base::loadNamespace(name)
   15. base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   16. base:::withOneRestart(expr, restarts[[1L]])
   17. base:::doWithOneRestart(return(expr), restart)
  
  -- 6. Error: vague tests of post_stratified_ITS (@test-post_stratified_ITS.R#14)
  there is no package called 'tidyr'
  Backtrace:
    1. simITS::adjust_data(...)
    2. simITS::aggregate_data(...)
    3. dplyr::select(., "month", groupname, Nname)
    3. dplyr::rename(...)
    3. dplyr::group_by(., month)
    3. dplyr::mutate(., pi = N/sum(N))
    3. dplyr::select(., -N)
   11. tidyr::pivot_wider(...)
   12. base::getExportedValue(pkg, name)
   13. base::asNamespace(ns)
   14. base::getNamespace(ns)
   15. base::loadNamespace(name)
   16. base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   17. base:::withOneRestart(expr, restarts[[1L]])
   18. base:::doWithOneRestart(return(expr), restart)
  
  -- 7. Error: aggregate_data (@test-post_stratified_ITS.R#45)  ------------------
  there is no package called 'tidyr'
  Backtrace:
    1. simITS::aggregate_data(meck, "pbail", "category", Nname = "N")
    2. dplyr::select(., "month", groupname, Nname)
    2. dplyr::rename(...)
    2. dplyr::group_by(., month)
    2. dplyr::mutate(., pi = N/sum(N))
    2. dplyr::select(., -N)
   10. tidyr::pivot_wider(...)
   11. base::getExportedValue(pkg, name)
   12. base::asNamespace(ns)
   13. base::getNamespace(ns)
   14. base::loadNamespace(name)
   15. base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   16. base:::withOneRestart(expr, restarts[[1L]])
   17. base:::doWithOneRestart(return(expr), restart)
  
  == testthat results  ===========================================================
  [ OK: 61 | SKIPPED: 0 | WARNINGS: 1 | FAILED: 7 ]
  1. Error: Aggregation of simulation results works (@test-aggregate_simulation_results.R#14) 
  2. Error: Alternate function works for aggregation (@test-aggregate_simulation_results.R#41) 
  3. Error: The four types of smooth vs summarize calls work (@test-general_tests.R#25) 
  4. Error: Smoothing with post.only=TRUE gives post smoothed only (@test-general_tests.R#49) 
  5. Error: make_envelope_graph works (@test-make_envelope_graph.R#18) 
  6. Error: vague tests of post_stratified_ITS (@test-post_stratified_ITS.R#14) 
  7. Error: aggregate_data (@test-post_stratified_ITS.R#45) 
  
  Error: testthat unit tests failed
  Execution halted