Running examples in 'ursa-Ex.R' failed
The error most likely occurred in:

> ### Name: as.Raster
> ### Title: Coercion to package 'raster' objects
> ### Aliases: as.Raster as.Raster.ursaRaster as.Raster.list
> ###   as.Raster.ursaStack as.Raster.NULL
> ### Keywords: methods
> 
> ### ** Examples
> 
> session_grid(NULL)
> if (requireNamespace("raster")) {
+    require(methods) ## need to 'raster::plot'
+    msk <- ursa_dummy(1,min=0,max=100)>40
+    a1 <- ursa_dummy(1,min=200,max=500)[msk]
+    a2 <- colorize(a1,ramp=FALSE)
+    a3 <- as.integer(ursa_dummy(3,min=0,max=255.99))
+    a4 <- ursa_stack(a3[msk])
+    if (isLayer <- TRUE) {
+       print(a1)
+       r1 <- as.Raster(a1)
+       message(as.character(class(r1)))
+       print(r1)
+       raster::plot(r1)
+       b1 <- as.ursa(r1)
+       print(c(exported=a1,imported=b1,failed=b1-a1))
+       print(c(theSameValue=identical(ursa_value(a1),ursa_value(b1))
+              ,rheSameGrid=identical(ursa_grid(a1),ursa_grid(b1))))
+    }
+    if (isLayerColortable <- TRUE) {
+       r2 <- as.Raster(a2)
+       message(as.character(class(r2)))
+       print(r2)
+       raster::plot(r2)
+       b2 <- as.ursa(r2)
+       print(c(theSameValue=identical(ursa_value(a2),ursa_value(b2))
+              ,rheSameGrid=identical(ursa_grid(a2),ursa_grid(b2))))
+    }
+    if (isBrickOrRGB <- TRUE) {
+       r3 <- as.Raster(a3)
+       message(as.character(class(r3)))
+       print(r3)
+       raster::plot(r3)
+       raster::plotRGB(r3)
+       b3 <- as.ursa(r3)
+       print(c(theSameValue=identical(ursa_value(a3),ursa_value(b3))
+              ,rheSameGrid=identical(ursa_grid(a3),ursa_grid(b3))))
+    }
+    if (isStack <- TRUE) {
+       r4 <- as.Raster(a4)
+       message(as.character(class(r4)))
+       print(r4)
+       raster::plot(r4)
+       b4 <- as.ursa(r4)
+       print(c(theSameValue=identical(ursa_value(a4),ursa_value(b4))
+              ,theSameGrid=identical(ursa_grid(a4),ursa_grid(b4))))
+    }
+ }
Loading required namespace: raster
           name    mean      sd      sum     min     max     n   nNA
[1] Saturday 28 355.626 47.6125 35309381 258.728 470.206 99288 36904
RasterLayer
class      : RasterLayer 
dimensions : 448, 304, 136192  (nrow, ncol, ncell)
resolution : 25000, 25000  (x, y)
extent     : -3850000, 3750000, -5350000, 5850000  (xmin, xmax, ymin, ymax)
crs        : +proj=stere +lat_0=90 +lat_ts=70.0 +lon_0=-45.0 +k=1 +x_0=0.0 +y_0=0.0 +a=6378273.000 +b=6356889.449 +units=m +no_defs 
source     : memory
names      : Saturday.28 
values     : 258.7284, 470.206  (min, max)

Error in as.double(y) : 
  cannot coerce type 'S4' to vector of type 'double'
Calls: <Anonymous> -> <Anonymous> -> plot.default -> xy.coords
Execution halted