Enjoying your package. The speeds are great! I have a reprex of a failing save/restore with qs. It requires raster package. Any chance this is fixable?
library(qs)
library(raster)
nx <- ny <- 100
N <- nx * ny
template <- raster(nrows = ny, ncols = nx, xmn = -nx / 2, xmx = nx / 2,
ymn = -ny / 2, ymx = ny / 2)
# Make dummy map
DEM <- raster(template)
DEM[] <- runif(N)
# Save and restore it
tf <- tempfile(fileext = ".qs");
qsave(DEM, file = tf)
DEM2 <- qread(tf)
all.equal(DEM@legend@names, DEM2@legend@names)
# [1] "Modes: logical, character" "Lengths: 0, 1"
# [3] "target is logical, current is character"
# With RDS -- fine
tf <- tempfile(fileext = ".rds");
saveRDS(DEM, file = tf)
DEM3 <- readRDS(tf)
all.equal(DEM@legend@names, DEM3@legend@names)
# [1] TRUE
Enjoying your package. The speeds are great! I have a reprex of a failing save/restore with
qs
. It requiresraster
package. Any chance this is fixable?