Running ‘testthat.R’ [14s/19s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(ggspatial)
  > 
  > test_check("ggspatial")
  Linking to GEOS 3.13.0, GDAL 3.9.3, PROJ 9.5.1; sf_use_s2() is TRUE
  [ FAIL 6 | WARN 0 | SKIP 29 | PASS 79 ]
  
  ══ Skipped tests (29) ══════════════════════════════════════════════════════════
  • On CRAN (20): 'test-annotation-north-arrow.R:7:3',
    'test-annotation-north-arrow.R:56:3', 'test-annotation-north-arrow.R:105:3',
    'test-annotation-north-arrow.R:144:3', 'test-annotation-north-arrow.R:166:3',
    'test-annotation-scale.R:48:3', 'test-annotation-scale.R:133:3',
    'test-annotation-scale.R:164:3', 'test-fixed-aspect.R:38:3',
    'test-geom-polypath.R:7:3', 'test-geom-spatial-rect.R:38:3',
    'test-geom-spatial-segment.R:29:3', 'test-geom-spatial-xline.R:16:3',
    'test-geom-spatial-xline.R:99:3', 'test-geom-spatial.R:36:3',
    'test-geom-spatial.R:75:3', 'test-geom-spatial.R:108:3',
    'test-layer-spatial-bbox.R:33:3', 'test-layer-spatial-stars.R:124:3',
    'test-layer-spatial.R:7:3'
  • {raster} is not installed (2): 'test-df-spatial-raster.R:3:3',
    'test-layer-spatial-stars.R:145:3'
  • {terra} is not installed (7): 'test-df-spatial-stars.R:25:3',
    'test-df-spatial-terra.R:3:3', 'test-df-spatial-terra.R:62:3',
    'test-df-spatial-terra.R:81:3', 'test-df-spatial-terra.R:98:3',
    'test-df-spatial-terra.R:123:3', 'test-layer-spatial-terra.R:123:3'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-df-spatial-raster.R:31:3'): x and y coordinates are exactly right for raster df ──
  <packageNotFoundError/error/condition>
  Error in `loadNamespace(x)`: there is no package called 'raster'
  Backtrace:
      ▆
   1. └─base::loadNamespace(x) at test-df-spatial-raster.R:31:3
   2.   └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   3.     └─base (local) withOneRestart(expr, restarts[[1L]])
   4.       └─base (local) doWithOneRestart(return(expr), restart)
  ── Error ('test-df-spatial-raster.R:55:3'): na.rm works on df_spatial.Raster() ──
  <packageNotFoundError/error/condition>
  Error in `loadNamespace(x)`: there is no package called 'raster'
  Backtrace:
      ▆
   1. ├─ggspatial::load_longlake_data(which = "longlake_osm", raster_format = "raster") at test-df-spatial-raster.R:55:3
   2. └─base::loadNamespace(x)
   3.   └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   4.     └─base (local) withOneRestart(expr, restarts[[1L]])
   5.       └─base (local) doWithOneRestart(return(expr), restart)
  ── Error ('test-df-spatial-raster.R:69:3'): Factor Raster* objects are properly converted ──
  <packageNotFoundError/error/condition>
  Error in `loadNamespace(x)`: there is no package called 'raster'
  Backtrace:
      ▆
   1. └─base::loadNamespace(x) at test-df-spatial-raster.R:69:3
   2.   └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   3.     └─base (local) withOneRestart(expr, restarts[[1L]])
   4.       └─base (local) doWithOneRestart(return(expr), restart)
  ── Error ('test-df-spatial-sf.R:12:3'): df_spatial() works with sf objects ─────
  <packageNotFoundError/error/condition>
  Error in `loadNamespace(x)`: there is no package called 'raster'
  Backtrace:
      ▆
   1. ├─ggspatial::load_longlake_data() at test-df-spatial-sf.R:12:3
   2. └─base::loadNamespace(x)
   3.   └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   4.     └─base (local) withOneRestart(expr, restarts[[1L]])
   5.       └─base (local) doWithOneRestart(return(expr), restart)
  ── Error ('test-df-spatial-sp.R:6:3'): df_spatial() works with sp objects ──────
  <packageNotFoundError/error/condition>
  Error in `loadNamespace(x)`: there is no package called 'raster'
  Backtrace:
      ▆
   1. ├─ggspatial::load_longlake_data(vector_format = "sp") at test-df-spatial-sp.R:6:3
   2. └─base::loadNamespace(x)
   3.   └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   4.     └─base (local) withOneRestart(expr, restarts[[1L]])
   5.       └─base (local) doWithOneRestart(return(expr), restart)
  ── Error ('test-longlake-data.R:5:3'): longlake data loader works as expected ──
  <packageNotFoundError/error/condition>
  Error in `loadNamespace(x)`: there is no package called 'raster'
  Backtrace:
      ▆
   1. ├─ggspatial::load_longlake_data(...) at test-longlake-data.R:5:3
   2. └─base::loadNamespace(x)
   3.   └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   4.     └─base (local) withOneRestart(expr, restarts[[1L]])
   5.       └─base (local) doWithOneRestart(return(expr), restart)
  
  [ FAIL 6 | WARN 0 | SKIP 29 | PASS 79 ]
  Error: Test failures
  Execution halted