Running ‘testthat.R’ [43s/23s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > test_check("BioTIMEr")
  Loading required package: BioTIMEr
  Starting 2 test processes.
  > test-gridding.R: OK: all SL studies have 1 grid cell
  > test-resampling.R: OK: all SL studies have 1 grid cell
  > test-gridding.R: OK: all SL studies have 1 grid cell
  > test-resampling.R: OK: all SL studies have 1 grid cell
  > test-gridding.R: OK: all SL studies have 1 grid cell
  > test-resampling.R: OK: all SL studies have 1 grid cell
  > test-gridding.R: OK: all SL studies have 1 grid cell
  > test-resampling.R: OK: all SL studies have 1 grid cell
  Saving _problems/test-resampling-10.R
  Saving _problems/test-resampling-11.R
  Saving _problems/test-resampling-37.R
  Saving _problems/test-resampling-46.R
  Saving _problems/test-resampling-60.R
  Saving _problems/test-resampling-85.R
  > test-gridding.R: OK: all SL studies have 1 grid cell
  > test-resampling_abundance.R: OK: all SL studies have 1 grid cell
  > test-gridding.R: OK: all SL studies have 1 grid cell
  > test-resampling_abundance_biomass.R: OK: all SL studies have 1 grid cell
  > test-resampling_abundance_biomass_conservative.R: OK: all SL studies have 1 grid cell
  > test-resampling_biomass.R: OK: all SL studies have 1 grid cell
  [ FAIL 6 | WARN 5 | SKIP 20 | PASS 65 ]
  
  ══ Skipped tests (20) ══════════════════════════════════════════════════════════
  • On CRAN (20): 'test-metrics.R:59:3', 'test-metrics.R:82:3',
    'test-metrics.R:95:3', 'test-metrics.R:107:3', 'test-metrics.R:120:3',
    'test-workflow_alpha.R:3:3', 'test-workflow_beta.R:3:3', 'test-slopes.R:3:3',
    'test-plots.R:4:3', 'test-scales.R:35:3', 'test-resampling.R:101:3',
    'test-resampling_abundance.R:11:3', 'test-gridding.R:75:3',
    'test-gridding.R:82:3', 'test-gridding.R:89:3',
    'test-resampling_abundance_biomass.R:11:3',
    'test-resampling_abundance_biomass_conservative.R:11:3',
    'test-resampling_core.R:91:3', 'test-resampling_core.R:164:3',
    'test-resampling_biomass.R:11:3'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Failure ('test-resampling.R:10:3'): resampling returns an object of same class as meta ──
  Expected `resdf <- resampling(test_df, measure = "BIOMASS")` not to throw any errors.
  Actually got a <simpleError> with message:
    attempt access index 20/20 in VECTOR_ELT
  ── Error ('test-resampling.R:11:3'): resampling returns an object of same class as meta ──
  Error in `eval(code, test_env)`: object 'resdf' not found
  Backtrace:
      ▆
   1. └─testthat::expect_s3_class(resdf, "data.frame") at test-resampling.R:11:3
   2.   └─testthat::quasi_label(enquo(object))
   3.     └─rlang::eval_bare(expr, quo_get_env(quo))
  ── Failure ('test-resampling.R:34:3'): gridded object passed to resampling is not changed by reference ──
  Expected `{ ... }` not to throw any errors.
  Actually got a <simpleError> with message:
    attempt access index 20/20 in VECTOR_ELT
  ── Failure ('test-resampling.R:40:3'): gridded object passed to resampling is not changed by reference ──
  Expected `{ ... }` not to throw any errors.
  Actually got a <simpleError> with message:
    attempt access index 20/20 in VECTOR_ELT
  ── Failure ('test-resampling.R:53:3'): gridded object passed to resampling is not changed by reference ──
  Expected `{ ... }` not to throw any errors.
  Actually got a <simpleError> with message:
    attempt access index 20/20 in VECTOR_ELT
  ── Error ('test-resampling.R:82:3'): resampling correctly excludes 1 year long studies ──
  Error in ``[.data.table`(x, j = `:=`(minsamp, data.table::uniqueN(SAMPLE_DESC)), keyby = c("assemblageID", "YEAR"))`: attempt access index 20/20 in VECTOR_ELT
  Backtrace:
       ▆
    1. ├─testthat::expect_warning(resampling(test_df_1y, "BIOMASS"), regexp = "Some 1-year-long studies were removed.") at test-resampling.R:82:3
    2. │ └─testthat:::expect_condition_matching_(...)
    3. │   └─testthat:::quasi_capture(...)
    4. │     ├─testthat (local) .capture(...)
    5. │     │ └─base::withCallingHandlers(...)
    6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    7. ├─BioTIMEr::resampling(test_df_1y, "BIOMASS")
    8. └─BioTIMEr:::resampling.default(test_df_1y, "BIOMASS")
    9.   └─BioTIMEr:::resampling_internal(...)
   10.     ├─...[]
   11.     └─data.table:::`[.data.table`(...)
  
  [ FAIL 6 | WARN 5 | SKIP 20 | PASS 65 ]
  Deleting unused snapshots: 'plots/themebiotime-plot.svg',
  'scales/color-continuous-cool-false.svg',
  'scales/color-continuous-cool-true.svg',
  'scales/color-continuous-gradient-false.svg',
  'scales/color-continuous-gradient-true.svg',
  'scales/color-continuous-realms-false.svg',
  'scales/color-continuous-realms-true.svg',
  'scales/color-continuous-warm-false.svg',
  'scales/color-continuous-warm-true.svg', 'scales/color-cool-false-false.svg',
  'scales/color-cool-false-true.svg', 'scales/color-cool-true-false.svg',
  'scales/color-cool-true-true.svg', 'scales/color-gradient-false-false.svg',
  'scales/color-gradient-false-true.svg', 'scales/color-gradient-true-false.svg',
  'scales/color-gradient-true-true.svg', 'scales/color-realms-false-false.svg',
  …, 'scales/fill-warm-true-false.svg', and 'scales/fill-warm-true-true.svg'
  Error:
  ! Test failures.
  Execution halted