Running ‘testthat.R’ [7s/11s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(vortexR)
  > 
  > test_check("vortexR")
  ── 1. Error: test SSMD_matrix (@test-SSMD_matrix.R#8)  ─────────────────────────
  the condition has length > 1
  1: SSMD_matrix(data = sta.main, project = "test", scenario = "test", params = c("PExtant", 
         "Nextant"), yrs = c(25, 50), ST = FALSE, save2disk = FALSE) at testthat/test-SSMD_matrix.R:8
  2: suppressWarnings(if (!yrs == "max" & !is.numeric(yrs)) stop("invalid value(s) for 'yrs' "))
  3: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
  
  ── 2. Error: fit-regressin (@test-fit_regression.R#27)  ────────────────────────
  the condition has length > 1
  1: fit_regression(data = lrun.ST_LHS.no.base, lookup = lkup.ST_LHS, census = FALSE, 
         project = "Pacioni_et_al", scenario = "ST_LHS", popn = 1, param = "N", vs = c("SV1", 
             "SV2", "SV3"), l = 2, ncand = 30, save2disk = FALSE) at testthat/test-fit_regression.R:27
  2: suppressWarnings(if (!is.na(lookup)) {
         data <- plyr::join(data, lookup, by = "Scenario", type = "left")
     })
  3: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
  
  ── 3. Error: test pairwise (@test-pairwise.R#8)  ───────────────────────────────
  the condition has length > 1
  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: suppressWarnings(if (!yrs == "max" & !is.numeric(yrs)) stop("invalid value(s) for 'yrs' "))
  3: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
  
  ── 4. Error: test m_scatter (@test-plot.R#60)  ─────────────────────────────────
  the condition has length > 1
  1: m_scatter(data = pac.lhs.no.base[1:33], data_type = "dat", lookup = lkup.ST_LHS, 
         yr = 120, popn = 1, param = "Nall", vs = c("SV1", "SV2", "SV3"), save2disk = FALSE) at testthat/test-plot.R:60
  2: suppressWarnings(if (!is.na(lookup)) {
         data <- plyr::join(data, lookup, by = "Scenario", type = "left")
     })
  3: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 25 SKIPPED: 0 FAILED: 4
  1. Error: test SSMD_matrix (@test-SSMD_matrix.R#8) 
  2. Error: fit-regressin (@test-fit_regression.R#27) 
  3. Error: test pairwise (@test-pairwise.R#8) 
  4. Error: test m_scatter (@test-plot.R#60) 
  
  Error: testthat unit tests failed
  Execution halted