Running ‘testthat.R’ [4s/8s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(metamer)
  > 
  > test_check("metamer")
  [ FAIL 3 | WARN 0 | SKIP 1 | PASS 22 ]
  
  ══ Skipped tests ═══════════════════════════════════════════════════════════════
  • ggplot2 cannot be loaded (1)
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-metamerize.R:49:3'): minimization works ────────────────────────
  Error in `FNN::get.knnx(data, data, k = 2)`: DLL requires the use of native symbols
  Backtrace:
      ▆
   1. ├─testthat::expect_s3_class(...) at test-metamerize.R:49:2
   2. │ └─testthat::quasi_label(enquo(object), arg = "object")
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. └─metamer::metamerize(...)
   5.   └─data$set_minimize(minimize)
   6.     └─self$minimize(self$last_metamer())
   7.       └─self$minimize_fun(data)
   8.         ├─base::mean(FNN::get.knnx(data, data, k = 2)$nn.dist[, 2])
   9.         └─FNN::get.knnx(data, data, k = 2)
  ── Error ('test-utilities.R:27:3'): mean_dist_to works ─────────────────────────
  Error in `FNN::get.knnx(target, as.matrix(data), k = 1)`: DLL requires the use of native symbols
  Backtrace:
      ▆
   1. ├─testthat::expect_equal(mean_dist_to(data)(data), 0) at test-utilities.R:27:2
   2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. └─mean_dist_to(data)(data)
   5.   ├─base::mean(FNN::get.knnx(target, as.matrix(data), k = 1)$nn.dist^d)
   6.   └─FNN::get.knnx(target, as.matrix(data), k = 1)
  ── Error ('test-utilities.R:33:3'): mean_self_proximity works ──────────────────
  Error in `FNN::get.knnx(data, data, k = 2)`: DLL requires the use of native symbols
  Backtrace:
      ▆
   1. ├─testthat::expect_gt(mean_self_proximity(data), 0) at test-utilities.R:33:2
   2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. └─metamer::mean_self_proximity(data)
   5.   ├─base::mean(FNN::get.knnx(data, data, k = 2)$nn.dist[, 2])
   6.   └─FNN::get.knnx(data, data, k = 2)
  
  [ FAIL 3 | WARN 0 | SKIP 1 | PASS 22 ]
  Error: Test failures
  Execution halted