# NOT RUN {
r <- rast(system.file("exdata/test.tif", package="terra"))
r
v <- values(r)
values(r) <- v * 10
r
f <- system.file("exdata/lux.shp", package="terra")
v <- vect(f)
x <- values(v)
x
values(v) <- x[,1:2]
v
# }
Run the code above in your browser using DataLab