Running 'testthat.R' [14s/16s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(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
  
  > library(BayesMallows)
  > 
  > test_check("BayesMallows")
  -- 1. Error: (unknown) (@test_compute_consensus.R#3)  --------------------------
  'where' must be an environment
  Backtrace:
    1. BayesMallows::compute_mallows(...)
    2. BayesMallows::generate_constraints(preferences, n_items)
    3. base::lapply(constraints, constraint_fun, n_items)
    4. BayesMallows:::FUN(X[[i]], ...)
    6. tidyr:::complete.data.frame(...)
    7. tidyr::replace_na(full, replace = fill)
    8. ellipsis::check_dots_used()
   10. ellipsis:::exit_handler(action)
   11. base::bquote(...)
  
  -- 2. Error: compute_mallows error model works (@test_compute_mallows.R#41)  ---
  'where' must be an environment
  Backtrace:
    1. testthat::expect_s3_class(...)
    4. BayesMallows::compute_mallows(...)
    5. BayesMallows::generate_constraints(preferences, n_items)
    6. base::lapply(constraints, constraint_fun, n_items)
    7. BayesMallows:::FUN(X[[i]], ...)
    9. tidyr:::complete.data.frame(...)
   10. tidyr::replace_na(full, replace = fill)
   11. ellipsis::check_dots_used()
   13. ellipsis:::exit_handler(action)
   14. base::bquote(...)
  
  -- 3. Error: compute_mallows handles integer preferences (@test_compute_mallows.
  'where' must be an environment
  Backtrace:
    1. dplyr::mutate_all(., as.integer)
    9. BayesMallows::compute_mallows(preferences = .)
   10. BayesMallows::generate_constraints(preferences, n_items)
   11. base::lapply(constraints, constraint_fun, n_items)
   12. BayesMallows:::FUN(X[[i]], ...)
   14. tidyr:::complete.data.frame(...)
   15. tidyr::replace_na(full, replace = fill)
   16. ellipsis::check_dots_used()
   18. ellipsis:::exit_handler(action)
   19. base::bquote(...)
  
  -- 4. Error: plot_top_k and predict_top_k fail when they should (@test_plot_top_
  'where' must be an environment
  Backtrace:
    1. BayesMallows::compute_mallows(...)
    2. BayesMallows::generate_constraints(preferences, n_items)
    3. base::lapply(constraints, constraint_fun, n_items)
    4. BayesMallows:::FUN(X[[i]], ...)
    6. tidyr:::complete.data.frame(...)
    7. tidyr::replace_na(full, replace = fill)
    8. ellipsis::check_dots_used()
   10. ellipsis:::exit_handler(action)
   11. base::bquote(...)
  
  == testthat results  ===========================================================
  [ OK: 157 | SKIPPED: 1 | WARNINGS: 0 | FAILED: 4 ]
  1. Error: (unknown) (@test_compute_consensus.R#3) 
  2. Error: compute_mallows error model works (@test_compute_mallows.R#41) 
  3. Error: compute_mallows handles integer preferences (@test_compute_mallows.R#64) 
  4. Error: plot_top_k and predict_top_k fail when they should (@test_plot_top_k.R#6) 
  
  Error: testthat unit tests failed
  Execution halted