Running ‘testthat.R’ [14s/17s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > # This file is part of the standard setup for testthat.
  > # It is recommended that you do not modify it.
  > #
  > # Where should you do additional test configuration?
  > # Learn more about the roles of various files in:
  > # * https://r-pkgs.org/tests.html
  > # * https://testthat.r-lib.org/reference/test_package.html#special-files
  > 
  > library(testthat)
  > library(ecoregime)
  > 
  > test_check("ecoregime")
  [ FAIL 20 | WARN 0 | SKIP 8 | PASS 164 ]
  
  ══ Skipped tests (8) ═══════════════════════════════════════════════════════════
  • On CRAN (8): 'test-plot.R:2:3', 'test-plot.R:16:3', 'test-plot.R:33:3',
    'test-plot.R:50:3', 'test-plot.R:67:3', 'test-plot.R:84:3',
    'test-plot.R:101:3', 'test-plot.R:115:3'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-EDR_metrics.R:36:3'): dDis is smaller when the reference trajectory belongs to the EDR
            than if it is external ──
  Error in `ecotraj::trajectoryDistances(d = d, sites = trajectories, surveys = states, 
      ...)`: unused arguments (sites = trajectories, surveys = states)
  Backtrace:
      ▆
   1. └─ecoregime::dDis(...) at test-EDR_metrics.R:36:3
   2.   └─base::as.matrix(...)
  ── Error ('test-EDR_metrics.R:72:3'): dDis decreases when the weight of trajectories close to the reference increases ──
  Error in `ecotraj::trajectoryDistances(d = d, sites = trajectories, surveys = states, 
      ...)`: unused arguments (sites = trajectories, surveys = states)
  Backtrace:
      ▆
   1. └─ecoregime::dDis(...) at test-EDR_metrics.R:72:3
   2.   └─base::as.matrix(...)
  ── Error ('test-EDR_metrics.R:94:3'): dBD is greater when trajectories belong to different EDRs ──
  Error in `ecotraj::trajectoryDistances(d = d, sites = trajectories, surveys = states, 
      ...)`: unused arguments (sites = trajectories, surveys = states)
  Backtrace:
      ▆
   1. └─ecoregime::dBD(...) at test-EDR_metrics.R:94:3
   2.   └─stats::as.dist(...)
  ── Error ('test-EDR_metrics.R:112:3'): dEve is smaller when trajectories belong to different EDRs ──
  Error in `ecotraj::trajectoryDistances(d = as.matrix(d), sites = trajectories, 
      surveys = states, ...)`: unused arguments (sites = trajectories, surveys = states)
  Backtrace:
      ▆
   1. └─ecoregime::dEve(...) at test-EDR_metrics.R:112:3
   2.   └─base::as.matrix(...)
  ── Error ('test-EDR_metrics.R:130:3'): dEve is smaller when trajectories of the same EDR have greater weight ──
  Error in `ecotraj::trajectoryDistances(d = as.matrix(d), sites = trajectories, 
      surveys = states, ...)`: unused arguments (sites = trajectories, surveys = states)
  Backtrace:
      ▆
   1. └─ecoregime::dEve(...) at test-EDR_metrics.R:130:3
   2.   └─base::as.matrix(...)
  ── Error ('test-EDR_metrics.R:264:3'): dEve returns errors ─────────────────────
  Error in `ecotraj::trajectoryDistances(d = as.matrix(d), sites = trajectories, 
      surveys = states, ...)`: unused arguments (sites = trajectories, surveys = states)
  Backtrace:
      ▆
   1. ├─testthat::expect_error(...) at test-EDR_metrics.R:264: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. └─ecoregime::dEve(...)
   8.   └─base::as.matrix(...)
  ── Error ('test-define_retra.R:60:3'): returns same results when data is defined from 'retra' ──
  Error in `ecotraj::segmentDistances(d = d, sites = trajectories, surveys = states)`: unused arguments (sites = trajectories, surveys = states)
  Backtrace:
      ▆
   1. └─ecoregime::retra_edr(...) at test-define_retra.R:60:3
  ── Error ('test-define_retra.R:111:3'): attributes change for a selection of states ──
  Error in `ecotraj::segmentDistances(d = d, sites = trajectories, surveys = states)`: unused arguments (sites = trajectories, surveys = states)
  Backtrace:
      ▆
   1. └─ecoregime::retra_edr(...) at test-define_retra.R:111:3
  ── Error ('test-define_retra.R:303:3'): returns errors ─────────────────────────
  Error in `ecotraj::segmentDistances(d = d, sites = trajectories, surveys = states)`: unused arguments (sites = trajectories, surveys = states)
  Backtrace:
      ▆
   1. └─ecoregime::retra_edr(...) at test-define_retra.R:303:3
  ── Error ('test-dist_edr.R:10:3'): dissimilarity of an EDR to itself is zero ───
  Error in `ecotraj::trajectoryDistances(d = dStates, sites = trajectories, 
      surveys = states)`: unused arguments (sites = trajectories, surveys = states)
  ── Error ('test-dist_edr.R:45:3'): symmetrize argument works ───────────────────
  Error in `ecotraj::trajectoryDistances(d = dStates, sites = paste0(abun$EDR, 
      "_", abun$traj), surveys = abun$state)`: unused arguments (sites = paste0(abun$EDR, "_", abun$traj), surveys = abun$state)
  ── Error ('test-dist_edr.R:125:3'): the properties of dDR are fit ──────────────
  Error in `ecotraj::trajectoryDistances(d = dStates, sites = paste0(abun$EDR, 
      "_", abun$traj), surveys = abun$state)`: unused arguments (sites = paste0(abun$EDR, "_", abun$traj), surveys = abun$state)
  ── Error ('test-dist_edr.R:157:3'): trajectories can be disordered ─────────────
  Error in `ecotraj::trajectoryDistances(d = dStates, sites = trajectories, 
      surveys = states)`: unused arguments (sites = trajectories, surveys = states)
  ── Error ('test-dist_edr.R:208:3'): returns errors ─────────────────────────────
  Error in `ecotraj::trajectoryDistances(d = dStates, sites = trajectories, 
      surveys = states)`: unused arguments (sites = trajectories, surveys = states)
  ── Error ('test-retra_edr.R:6:3'): returns an object of class 'RETRA' ──────────
  Error in `ecotraj::segmentDistances(d = d, sites = trajectories, surveys = states)`: unused arguments (sites = trajectories, surveys = states)
  Backtrace:
      ▆
   1. └─ecoregime::retra_edr(...) at test-retra_edr.R:6:3
  ── Error ('test-retra_edr.R:37:3'): returns same results for dSegs and coordSegs ──
  Error in `ecotraj::segmentDistances(d = d, sites = trajectories, surveys = states)`: unused arguments (sites = trajectories, surveys = states)
  ── Error ('test-retra_edr.R:84:3'): minSegs and eps work ───────────────────────
  Error in `ecotraj::segmentDistances(d = d, sites = trajectories, surveys = states)`: unused arguments (sites = trajectories, surveys = states)
  Backtrace:
      ▆
   1. └─ecoregime::retra_edr(...) at test-retra_edr.R:84:3
  ── Error ('test-retra_edr.R:106:3'): attributes are correct when there is only a segment ──
  Error in `ecotraj::segmentDistances(d = d, sites = trajectories, surveys = states)`: unused arguments (sites = trajectories, surveys = states)
  Backtrace:
      ▆
   1. └─ecoregime::retra_edr(...) at test-retra_edr.R:106:3
  ── Error ('test-retra_edr.R:124:3'): returns errors ────────────────────────────
  Error in `ecotraj::segmentDistances(d = d, sites = trajectories, surveys = states)`: unused arguments (sites = trajectories, surveys = states)
  ── Error ('test-summary.R:5:3'): summarizes representative trajectories from retra_edr and define_retra ──
  Error in `ecotraj::segmentDistances(d = d, sites = trajectories, surveys = states)`: unused arguments (sites = trajectories, surveys = states)
  Backtrace:
      ▆
   1. └─ecoregime::retra_edr(...) at test-summary.R:5:3
  
  [ FAIL 20 | WARN 0 | SKIP 8 | PASS 164 ]
  Error: Test failures
  Execution halted