Running ‘testthat.R’ [23s/34s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(ggspatial)
  Loading required package: ggplot2
  > 
  > test_check("ggspatial")
  ── 1. Error: deprecated tests run without error (@test-deprecated.R#23)  ───────
  Some .id values are present in attrs and missing in fortified
  1: print(ggplot() + geom_spatial(longlake_depthdf)) at testthat/test-deprecated.R:23
  2: geom_spatial(longlake_depthdf)
  3: geom_spatial.default(longlake_depthdf)
  4: spatial_fortify(data, attribute_table)
  5: spatial_fortify.SpatialPointsDataFrame(data, attribute_table)
  6: spatial_fortify.default(x, attrs, ...)
  7: stop("Some .id values are present in attrs and missing in fortified")
  
  ── 2. Error: old stat project works (@test-deprecated.R#109)  ──────────────────
  object 'DEPTH.M' not found
  1: expect_silent(print(ggplot() + stat_project(aes(LON, LAT, col = DEPTH.M), data = longlake_depthdf, 
         crsfrom = 4326, crsto = 26920) + labs(caption = "These coordinates should be in UTM not lat/lon"))) at testthat/test-deprecated.R:109
  2: quasi_capture(enquo(object), evaluate_promise)
  3: capture(act$val <- eval_bare(get_expr(quo), get_env(quo)))
  4: withr::with_output_sink(temp, withCallingHandlers(withVisible(code), warning = handle_warning, 
         message = handle_message))
  5: force(code)
  6: withCallingHandlers(withVisible(code), warning = handle_warning, message = handle_message)
  7: withVisible(code)
  8: eval_bare(get_expr(quo), get_env(quo))
  9: print(ggplot() + stat_project(aes(LON, LAT, col = DEPTH.M), data = longlake_depthdf, 
         crsfrom = 4326, crsto = 26920) + labs(caption = "These coordinates should be in UTM not lat/lon"))
  10: print.ggplot(ggplot() + stat_project(aes(LON, LAT, col = DEPTH.M), data = longlake_depthdf, 
         crsfrom = 4326, crsto = 26920) + labs(caption = "These coordinates should be in UTM not lat/lon"))
  11: ggplot_build(x)
  12: ggplot_build.ggplot(x)
  13: by_layer(function(l, d) l$compute_aesthetics(d, plot))
  14: f(l = layers[[i]], d = data[[i]])
  15: l$compute_aesthetics(d, plot)
  16: f(..., self = self)
  17: scales_add_defaults(plot$scales, data, aesthetics, plot$plot_env)
  18: lapply(aesthetics[new_aesthetics], rlang::eval_tidy, data = data)
  19: FUN(X[[i]], ...)
  
  ── 3. Error: deprecated OSM tiles work (@test-deprecated.R#147)  ───────────────
  Some .id values are present in attrs and missing in fortified
  1: expect_message(print(ggplot() + geom_osm(zoom = 15, type = "osm", cachedir = system.file("rosm.cache", 
         package = "ggspatial")) + geom_spatial(longlake_depthdf, crsto = 4326) + coord_map()), 
         "Zoom: 15") at testthat/test-deprecated.R:147
  2: quasi_capture(enquo(object), capture_messages, label = label)
  3: capture(act$val <- eval_bare(get_expr(quo), get_env(quo)))
  4: withCallingHandlers(code, message = function(condition) {
         out$push(condition)
         invokeRestart("muffleMessage")
     })
  5: eval_bare(get_expr(quo), get_env(quo))
  6: print(ggplot() + geom_osm(zoom = 15, type = "osm", cachedir = system.file("rosm.cache", 
         package = "ggspatial")) + geom_spatial(longlake_depthdf, crsto = 4326) + coord_map())
  7: geom_spatial(longlake_depthdf, crsto = 4326)
  8: geom_spatial.sf(longlake_depthdf, crsto = 4326)
  9: geom_spatial.default(methods::as(sf::st_zm(data), "Spatial"), mapping = mapping, 
         show.legend = show.legend, inherit.aes = inherit.aes, position = position, crsfrom = crsfrom, 
         crsto = crsto, attribute_table = attribute_table, geom = geom, stat = stat, ...)
  10: spatial_fortify(data, attribute_table)
  11: spatial_fortify.SpatialPointsDataFrame(data, attribute_table)
  12: spatial_fortify.default(x, attrs, ...)
  13: stop("Some .id values are present in attrs and missing in fortified")
  
  ── 4. Error: geom_spatial_* geoms work properly (@test-geom_spatial.R#26)  ─────
  Some .id values are present in attrs and missing in fortified
  1: spatial_fortify(longlake_depthdf) at testthat/test-geom_spatial.R:26
  2: spatial_fortify.sf(longlake_depthdf)
  3: spatial_fortify(methods::as(sf::st_zm(x), "Spatial"), attrs = attrs, ...)
  4: spatial_fortify.SpatialPointsDataFrame(methods::as(sf::st_zm(x), "Spatial"), attrs = attrs, 
         ...)
  5: spatial_fortify.default(x, attrs, ...)
  6: stop("Some .id values are present in attrs and missing in fortified")
  
  ── 5. Error: layer_spatial() works as intended (@test-layer-spatial.R#6)  ──────
  object 'DEPTH.M' not found
  1: print(ggplot() + layer_spatial(longlake_roadsdf, size = 1, col = "black") + layer_spatial(longlake_roadsdf, 
         size = 0.8, col = "white") + layer_spatial(longlake_waterdf, fill = "lightblue", 
         col = NA) + layer_spatial(longlake_depthdf, aes(col = DEPTH.M)) + labs(caption = "Should show long lake, round lake, etc.")) at testthat/test-layer-spatial.R:6
  2: print.ggplot(ggplot() + layer_spatial(longlake_roadsdf, size = 1, col = "black") + 
         layer_spatial(longlake_roadsdf, size = 0.8, col = "white") + layer_spatial(longlake_waterdf, 
         fill = "lightblue", col = NA) + layer_spatial(longlake_depthdf, aes(col = DEPTH.M)) + 
         labs(caption = "Should show long lake, round lake, etc."))
  3: ggplot_build(x)
  4: ggplot_build.ggplot(x)
  5: by_layer(function(l, d) l$compute_aesthetics(d, plot))
  6: f(l = layers[[i]], d = data[[i]])
  7: l$compute_aesthetics(d, plot)
  8: f(..., self = self)
  9: scales_add_defaults(plot$scales, data, aesthetics, plot$plot_env)
  10: lapply(aesthetics[new_aesthetics], rlang::eval_tidy, data = data)
  11: FUN(X[[i]], ...)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 112 SKIPPED: 0 FAILED: 5
  1. Error: deprecated tests run without error (@test-deprecated.R#23) 
  2. Error: old stat project works (@test-deprecated.R#109) 
  3. Error: deprecated OSM tiles work (@test-deprecated.R#147) 
  4. Error: geom_spatial_* geoms work properly (@test-geom_spatial.R#26) 
  5. Error: layer_spatial() works as intended (@test-layer-spatial.R#6) 
  
  Error: testthat unit tests failed
  Execution halted