Running ‘testthat.R’ [12s/21s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(vortexR)
  > 
  > test_check("vortexR")
  ── 1. Error: test Nadults (@test-Ne_Nadults.R#24)  ─────────────────────────────
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: suppressMessages(NadultAll <- Nadults(data = pac.yr[[2]], scenarios = "all", gen = 2.54, 
         yr0 = 50, yrt = 120, save2disk = FALSE)) at testthat/test-Ne_Nadults.R:24
  2: withCallingHandlers(expr, message = function(c) invokeRestart("muffleMessage"))
  3: Nadults(data = pac.yr[[2]], scenarios = "all", gen = 2.54, yr0 = 50, yrt = 120, save2disk = FALSE)
  4: slcensusMeans[, lapply(.SD, HarmMean), .SDcols = c("Nad", "N"), by = list(Scenario, 
         Population)]
  5: `[.data.table`(slcensusMeans, , lapply(.SD, HarmMean), .SDcols = c("Nad", "N"), by = list(Scenario, 
         Population))
  
  ── 2. Error: test SSMD_matrix (@test-SSMD_matrix.R#13)  ────────────────────────
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: pairwise(data = sta.main, project = "Campbell_et_al", scenario = "baseline", params = c("PExtant", 
         "Nextant"), yrs = c(25, 50), ST = FALSE, type = "Single-Factor", SVs = c("SV1", 
         "SV2", "SV3", "SV4", "SV5", "SV6", "SV7"), save2disk = FALSE) at testthat/test-SSMD_matrix.R:13
  2: DT.table.coef[, lapply(-abs(.SD), rank, na.last = "keep"), by = Population, .SDcols = h.coef]
  3: `[.data.table`(DT.table.coef, , lapply(-abs(.SD), rank, na.last = "keep"), by = Population, 
         .SDcols = h.coef)
  
     Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
      0.0     0.0   380.5   441.7   779.8  1544.0 
  Initialization...
  TASK: Diagnostic of candidate set.
  Sample size: 150
  0 factor(s).
  3 covariate(s).
  0 f exclusion(s).
  0 c exclusion(s).
  0 f:f exclusion(s).
  0 c:c exclusion(s).
  0 f:c exclusion(s).
  Size constraints: min =  0 max = -1
  Complexity constraints: min =  0 max = -1
  Your candidate set contains 64 models.
  TASK: Genetic algorithm in the candidate set.
  Initialization...
  Algorithm started...
  Improvements in best and average IC have bebingo en below the specified goals.
  Algorithm is declared to have converged.
  Completed.
     user  system elapsed 
    0.920   0.072   1.323 
  ── 3. Error: test pairwise (@test-pairwise.R#8)  ───────────────────────────────
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: pairwise(data = pac.clas, project = "Pacioni_et_al", scenario = "ST_Classic", params = c("Nall", 
         "Het"), yrs = c(60, 120), ST = T, type = "Single-Factor", SVs = c("SV1", "SV2", 
         "SV3", "SV4", "SV5", "SV6", "SV7"), save2disk = FALSE) at testthat/test-pairwise.R:8
  2: DT.table.coef[, lapply(-abs(.SD), rank, na.last = "keep"), by = Population, .SDcols = h.coef]
  3: `[.data.table`(DT.table.coef, , lapply(-abs(.SD), rank, na.last = "keep"), by = Population, 
         .SDcols = h.coef)
  
  ── 4. Error: rRec (@test-rRec.R#9)  ────────────────────────────────────────────
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: rRec(pac.clas, project = "Pacioni_et_al", scenario = "ST_Classic", ST = TRUE, runs = 3, 
         yr0 = 1, yrt = 120, save2disk = FALSE) at testthat/test-rRec.R:9
  2: data[J(yr0:yrt), .(rruns = r.stoch * runs, SDruns = SD.r. * runs), by = c("scen.name", 
         "pop.name")]
  3: `[.data.table`(data, J(yr0:yrt), .(rruns = r.stoch * runs, SDruns = SD.r. * runs), 
         by = c("scen.name", "pop.name"))
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 24 SKIPPED: 0 FAILED: 4
  1. Error: test Nadults (@test-Ne_Nadults.R#24) 
  2. Error: test SSMD_matrix (@test-SSMD_matrix.R#13) 
  3. Error: test pairwise (@test-pairwise.R#8) 
  4. Error: rRec (@test-rRec.R#9) 
  
  Error: testthat unit tests failed
  Execution halted