Running ‘testthat.R’ [17s/21s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(BIOMASS)
  For more information on using BIOMASS, visit https://umr-amap.github.io/BIOMASS
  
  Using temporary cache
    It is recommended to use a permanent cache to avoid to re-download files on each session.
    See function createCache() or BIOMASS.cache option.
  > 
  > test_check("BIOMASS")
  Saving _problems/test-AGBmonteCarlo-289.R
  Saving _problems/test-check_coord_plot-85.R
  Saving _problems/test-check_coord_plot-96.R
  Saving _problems/test-dividePlot-7.R
  Saving _problems/test-retrieveH-77.R
  Saving _problems/test-small_function-242.R
  Saving _problems/test-subplot_summary-7.R
  [ FAIL 7 | WARN 0 | SKIP 17 | PASS 359 ]
  
  ══ Skipped tests (17) ══════════════════════════════════════════════════════════
  • On CRAN (17): 'test-AGBmonteCarlo.R:153:3', 'test-check_coord_plot.R:106:3',
    'test-check_coord_plot.R:124:3', 'test-computeAGB.R:43:3',
    'test-correctTaxo.R:5:3', 'test-modelHD.R:120:3', 'test-retrieveH.R:36:3',
    'test-small_function.R:22:3', 'test-small_function.R:38:3',
    'test-small_function.R:102:3', 'test-small_function.R:112:3',
    'test-small_function.R:124:3', 'test-small_function.R:140:5',
    'test-small_function.R:140:5', 'test-small_function.R:140:5',
    'test-small_function.R:140:5', 'test-small_function.R:162:3'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-AGBmonteCarlo.R:289:3'): With the plot value ───────────────────
  Error in ``[.data.table`(data, , `:=`(H, predictHeight(D, model = model[[unique(plot)]], err)), by = plot)`: attempt access index 2/2 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─BIOMASS::AGBmonteCarlo(...) at test-AGBmonteCarlo.R:289:3
   2.   └─base::apply(...)
   3.     └─BIOMASS (local) FUN(newX[, i], ...)
   4.       └─BIOMASS::predictHeight(x, model = HDmodel, err = TRUE, plot = plot)
   5.         ├─...[]
   6.         └─data.table:::`[.data.table`(...)
  ── Error ('test-check_coord_plot.R:85:3'): check_plot_coord in long lat ────────
  Error in ``[.data.table`(coord, , `:=`(c("X", "Y"), proj4::project(.(long, lat), proj = unique(.BY))), by = codeUTM)`: attempt access index 3/3 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─BIOMASS::check_plot_coord(...) at test-check_coord_plot.R:85:3
   2. │ ├─corner_dt[, latlong2UTM_fct(.SD), by = plot_ID, .SDcols = colnames(corner_dt)]
   3. │ └─data.table:::`[.data.table`(...)
   4. └─BIOMASS (local) latlong2UTM_fct(.SD)
   5.   └─BIOMASS::latlong2UTM(dat[, c("long", "lat")])
   6.     ├─...[]
   7.     └─data.table:::`[.data.table`(...)
  ── Error ('test-check_coord_plot.R:94:3'): check_plot_coord, trust_GPS_corners ──
  Error in ``[.data.table`(corner_dat, , `:=`(c("x_proj_mean", "y_proj_mean", "row_number"), list(mean(x_proj), mean(y_proj), .I)), by = list(x_rel, y_rel))`: attempt access index 9/9 in VECTOR_ELT
  Backtrace:
       ▆
    1. ├─testthat::expect_warning(...) at test-check_coord_plot.R:94:3
    2. │ └─testthat:::quasi_capture(...)
    3. │   ├─testthat (local) .capture(...)
    4. │   │ └─base::withCallingHandlers(...)
    5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    6. ├─BIOMASS::check_plot_coord(...)
    7. │ ├─corner_dt[, check_corner_fct(.SD), by = plot_ID, .SDcols = colnames(corner_dt)]
    8. │ └─data.table:::`[.data.table`(...)
    9. └─BIOMASS (local) check_corner_fct(.SD)
   10.   ├─...[]
   11.   └─data.table:::`[.data.table`(...)
  ── Error ('test-dividePlot.R:7:1'): (code run outside of `test_that()`) ────────
  Error in ``[.data.table`(corner_dat, , `:=`(c("x_proj_mean", "y_proj_mean", "row_number"), list(mean(x_proj), mean(y_proj), .I)), by = list(x_rel, y_rel))`: attempt access index 9/9 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─base::suppressWarnings(...) at test-dividePlot.R:7:1
   2. │ └─base::withCallingHandlers(...)
   3. ├─BIOMASS::check_plot_coord(...)
   4. │ ├─corner_dt[, check_corner_fct(.SD), by = plot_ID, .SDcols = colnames(corner_dt)]
   5. │ └─data.table:::`[.data.table`(...)
   6. └─BIOMASS (local) check_corner_fct(.SD)
   7.   ├─...[]
   8.   └─data.table:::`[.data.table`(...)
  ── Error ('test-retrieveH.R:77:3'): With the plot ──────────────────────────────
  Error in ``[.data.table`(data, , `:=`(H, predictHeight(D, model = model[[unique(plot)]], err)), by = plot)`: attempt access index 2/2 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─BIOMASS::retrieveH(D, model, plot = NouraguesHD$plotId) at test-retrieveH.R:77:3
   2.   └─BIOMASS::predictHeight(D, model, plot = plot)
   3.     ├─...[]
   4.     └─data.table:::`[.data.table`(...)
  ── Error ('test-small_function.R:242:3'): lat long to UTM ──────────────────────
  Error in ``[.data.table`(coord, , `:=`(c("X", "Y"), proj4::project(.(long, lat), proj = unique(.BY))), by = codeUTM)`: attempt access index 3/3 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─BIOMASS::latlong2UTM(coord) at test-small_function.R:242:3
   2.   ├─...[]
   3.   └─data.table:::`[.data.table`(...)
  ── Error ('test-subplot_summary.R:7:1'): (code run outside of `test_that()`) ───
  Error in ``[.data.table`(corner_dat, , `:=`(c("x_proj_mean", "y_proj_mean", "row_number"), list(mean(x_proj), mean(y_proj), .I)), by = list(x_rel, y_rel))`: attempt access index 9/9 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─base::suppressWarnings(...) at test-subplot_summary.R:7:1
   2. │ └─base::withCallingHandlers(...)
   3. ├─BIOMASS::check_plot_coord(...)
   4. │ ├─corner_dt[, check_corner_fct(.SD), by = plot_ID, .SDcols = colnames(corner_dt)]
   5. │ └─data.table:::`[.data.table`(...)
   6. └─BIOMASS (local) check_corner_fct(.SD)
   7.   ├─...[]
   8.   └─data.table:::`[.data.table`(...)
  
  [ FAIL 7 | WARN 0 | SKIP 17 | PASS 359 ]
  Deleting unused snapshots:
  'subplot_summary/subplot-summary-multiple-metrics-204.svg',
  'subplot_summary/subplot-summary-multiple-plot-201.svg',
  'subplot_summary/subplot-summary-multiple-plot-204.svg',
  'subplot_summary/subplot-summary-proj-coords.svg',
  'subplot_summary/subplot-summary-quantile.svg', and
  'subplot_summary/subplot-summary-rel-coords.svg'
  Error:
  ! Test failures.
  Execution halted