Running ‘testthat.R’ [241s/270s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > # load packages
  > library(testthat)
  > library(prioritizr)
  Loading required package: raster
  Loading required package: sp
  Loading required package: proto
  > 
  > # load solver packages
  > require(gurobi)
  Loading required package: gurobi
  Warning message:
  In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE,  :
    there is no package called 'gurobi'
  > require(lpsymphony)
  Loading required package: lpsymphony
  > require(Rsymphony)
  Loading required package: Rsymphony
  > 
  > # enable parallel testing
  > Sys.unsetenv("R_TESTS")
  > 
  > # run tests
  > test_check("prioritizr")
  list()
  attr(,"class")
  [1] "Waiver"
  ── 1. Error: simulate_data (@test_simulate.R#6)  ───────────────────────────────
  the "RandomFields" package needs to be installed to simulate data
  1: simulate_data(r, n = 2, model = RandomFields::RMgauss(), transform = plogis) at testthat/test_simulate.R:6
  2: stop("the \"RandomFields\" package needs to be installed to simulate data")
  
  ── 2. Error: simulate_species (@test_simulate.R#20)  ───────────────────────────
  the "RandomFields" package needs to be installed to simulate data
  1: simulate_species(r, n = 2) at testthat/test_simulate.R:20
  2: simulate_data(x = x, n = n, model = model, transform = transform, ...)
  3: stop("the \"RandomFields\" package needs to be installed to simulate data")
  
  ── 3. Error: simulate_cost (@test_simulate.R#33)  ──────────────────────────────
  the "RandomFields" package needs to be installed to simulate data
  1: simulate_cost(r, n = 2) at testthat/test_simulate.R:33
  2: simulate_data(x, n = n, model = model, transform = transform, ...)
  3: stop("the \"RandomFields\" package needs to be installed to simulate data")
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 11538 SKIPPED: 115 FAILED: 3
  1. Error: simulate_data (@test_simulate.R#6) 
  2. Error: simulate_species (@test_simulate.R#20) 
  3. Error: simulate_cost (@test_simulate.R#33) 
  
  Error: testthat unit tests failed
  Execution halted