Running 'spelling.R' [1s]
  Running 'testthat.R' [34s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(SDMtune)
  
     _____  ____   __  ___ __
    / ___/ / __ \ /  |/  // /_ __  __ ____   ___
    \__ \ / / / // /|_/ // __// / / // __ \ / _ \
   ___/ // /_/ // /  / // /_ / /_/ // / / //  __/
  /____//_____//_/  /_/ \__/ \__,_//_/ /_/ \___/  version 1.0.0
  
  To cite this package in publications type: citation("SDMtune").
  > 
  > test_check("SDMtune")
  -- 1. Failure: The values are correct and the file is saved with correct format 
  unique(p$data$value) not equal to c(FALSE, TRUE).
  2 element mismatches
  
  -- 2. Error: (unknown) (@test-plotROC.R#1)  ------------------------------------
  could not find function ".categorical"
  Backtrace:
    1. SDMtune::plotROC(SDMtune:::bm_maxent, test = SDMtune:::t)
    4. SDMtune::predict(model, data = model@data, type = type)
    5. SDMtune:::.local(object, ...)
    7. SDMtune::predict(model, data, type = type, clamp = clamp)
    8. SDMtune:::.local(object, ...)
   10. stats::model.matrix.default(f, data)
   12. stats::model.frame.default(object, data, xlev = xlev)
   13. [ base::eval(...) ] with 1 more call
  
  -- 3. Error: The output is correct when test argument is not given (@test-thresh
  could not find function ".categorical"
  Backtrace:
    1. SDMtune::thresholds(m, type = "cloglog")
    2. SDMtune::confMatrix(model, type = type)
    4. SDMtune::predict(model, data, type = type)
    5. SDMtune:::.local(object, ...)
    7. SDMtune::predict(model, data, type = type, clamp = clamp)
    8. SDMtune:::.local(object, ...)
   10. stats::model.matrix.default(f, data)
   12. stats::model.frame.default(object, data, xlev = xlev)
   13. [ base::eval(...) ] with 1 more call
  
  -- 4. Error: The output is correct when test argument is given (@test-thresholds
  could not find function ".categorical"
  Backtrace:
    1. SDMtune::thresholds(m, type = "cloglog", test = test)
    2. SDMtune::confMatrix(model, type = type)
    4. SDMtune::predict(model, data, type = type)
    5. SDMtune:::.local(object, ...)
    7. SDMtune::predict(model, data, type = type, clamp = clamp)
    8. SDMtune:::.local(object, ...)
   10. stats::model.matrix.default(f, data)
   12. stats::model.frame.default(object, data, xlev = xlev)
   13. [ base::eval(...) ] with 1 more call
  
  == testthat results  ===========================================================
  [ OK: 404 | SKIPPED: 29 | WARNINGS: 0 | FAILED: 4 ]
  1. Failure: The values are correct and the file is saved with correct format (@test-plotPA.R#12) 
  2. Error: (unknown) (@test-plotROC.R#1) 
  3. Error: The output is correct when test argument is not given (@test-thresholds.R#5) 
  4. Error: The output is correct when test argument is given (@test-thresholds.R#15) 
  
  Error: testthat unit tests failed
  Execution halted