# NOT RUN {
s <- rast(ncols=5, nrows=5, nlyrs=3)
x <- s
names(s)
names(s) <- c("a", "b", "c")
names(s)
names(x)
x <- s
set.names(s, c("e", "f", "g"))
names(s)
names(x)
set.ext(x, c(0,180,0,90))
f <- system.file("ex/elev.tif", package="terra")
r <- rast(f)
#values from file to memory
set.values(r)
# change values
set.values(r, 1:1000, 900)
# }
Run the code above in your browser using DataLab