Running ‘testthat.R’ [21s/26s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(OpenSpecy)
  > 
  > library(data.table)
  
  Attaching package: 'data.table'
  
  The following object is masked from 'package:base':
  
      %notin%
  
  > setDTthreads(2)
  > 
  > test_check("OpenSpecy")
  Saving _problems/test-def_features-15.R
  Saving _problems/test-def_features-30.R
  Saving _problems/test-def_features-93.R
  Saving _problems/test-def_features-208.R
  [ FAIL 4 | WARN 0 | SKIP 6 | PASS 470 ]
  
  ══ Skipped tests (6) ═══════════════════════════════════════════════════════════
  • On CRAN (6): 'test-def_features.R:118:3', 'test-def_features.R:139:3',
    'test-manage_lib.R:7:3', 'test-manage_lib.R:28:3', 'test-match_spec.R:63:3',
    'test-match_spec.R:201:3'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-def_features.R:15:3'): features are identified when given logical ──
  Error in ``[.data.table`(md, , `:=`("rand_x", sample(x, 1)), by = "feature_id")`: attempt access index 27/27 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─OpenSpecy::def_features(map, map$metadata$particles) at test-def_features.R:15:3
   2. └─OpenSpecy:::def_features.OpenSpecy(map, map$metadata$particles)
   3.   ├─md[, `:=`("rand_x", sample(x, 1)), by = "feature_id"]
   4.   └─data.table:::`[.data.table`(...)
  ── Error ('test-def_features.R:30:5'): features are identified with sig_noise and smoothing with closing ──
  Error in ``[.data.table`(md, , `:=`("rand_x", sample(x, 1)), by = "feature_id")`: attempt access index 28/28 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─OpenSpecy::def_features(map, map$metadata$snr > 0.1) at test-def_features.R:30:5
   2. └─OpenSpecy:::def_features.OpenSpecy(map, map$metadata$snr > 0.1)
   3.   ├─md[, `:=`("rand_x", sample(x, 1)), by = "feature_id"]
   4.   └─data.table:::`[.data.table`(...)
  ── Error ('test-def_features.R:93:3'): particles are identified when given character ──
  Error in ``[.data.table`(md, , `:=`("rand_x", sample(x, 1)), by = "feature_id")`: attempt access index 28/28 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─OpenSpecy::def_features(map, map$metadata$particles) at test-def_features.R:93:3
   2. └─OpenSpecy:::def_features.OpenSpecy(map, map$metadata$particles)
   3.   ├─md[, `:=`("rand_x", sample(x, 1)), by = "feature_id"]
   4.   └─data.table:::`[.data.table`(...)
  ── Error ('test-def_features.R:208:5'): RGB values are correctly extracted and stored in metadata ──
  Error in ``[.data.table`(md, , `:=`(mean_r = as.integer(sqrt(mean(r^2))), mean_g = as.integer(sqrt(mean(g^2))), mean_b = as.integer(sqrt(mean(b^2)))), by = "feature_id")`: attempt access index 25/25 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─OpenSpecy::def_features(...) at test-def_features.R:208:5
   2. └─OpenSpecy:::def_features.OpenSpecy(...)
   3.   ├─...[]
   4.   └─data.table:::`[.data.table`(...)
  
  [ FAIL 4 | WARN 0 | SKIP 6 | PASS 470 ]
  Error:
  ! Test failures.
  Execution halted