inst/tinytest/test_rds.R

f <- system.file("ex/rds_tst.rds", package="terra")
x <- rast(f)

y <- rast(nrows=2, ncols=2, vals=1:4, names="random")
time(y) <- as.POSIXct("2025-01-25 21:28:51", tz="UTC") 

expect_true(all.equal(x, y))

Try the terra package in your browser

Any scripts or data that you put into this service are public.

terra documentation built on April 12, 2025, 1:43 a.m.