Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 1.8.10 breaks readRDS #1711

Closed
pascaloettli opened this issue Jan 17, 2025 · 3 comments
Closed

Version 1.8.10 breaks readRDS #1711

pascaloettli opened this issue Jan 17, 2025 · 3 comments

Comments

@pascaloettli
Copy link

pascaloettli commented Jan 17, 2025

Version 1.8.5

x <- rast(nrows=108, ncols=21, xmin=0, xmax=10)
values(x) <- 1:ncell(x)
names(x) <- "random"
time(x) <- Sys.time()

saveRDS(x, "/tmp/test.rds")
readRDS("/tmp/test.rds")

class : SpatRaster
dimensions : 108, 21, 1 (nrow, ncol, nlyr)
resolution : 0.4761905, 1.666667 (x, y)
extent : 0, 10, -90, 90 (xmin, xmax, ymin, ymax)
coord. ref. : lon/lat WGS 84 (CRS84) (OGC:CRS84)
source(s) : memory
name : random
min value : 1
max value : 2268
time : 2025-01-17 09:21:53 UTC

Version 1.8.10 (and 1.8.11)

x <- rast(nrows=108, ncols=21, xmin=0, xmax=10)
values(x) <- 1:ncell(x)
names(x) <- "random"
time(x) <- Sys.time()

saveRDS(x, "/tmp/test.rds")
readRDS("/tmp/test.rds")

Error in match.arg(as.character(tstep), c("months", "years", "yearmonths", :
'arg' should be one of “months”, “years”, “yearmonths”, “raw”

@bakamotokatas
Copy link

also terra::unwrap gives same error with version 1.8.10

@rhijmans
Copy link
Member

Very ugly. Fixed now.

@pascaloettli
Copy link
Author

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants