# NOT RUN {
s <- rast(system.file("ex/logo.tif", package="terra"))
x <- sds(s, s/2)
names(x) <- c("first", "second")
x
length(x)
# extract the second SpatRaster
x[2]
a <- array(1:9, c(3,3,3,3))
sds(a)
# }
Run the code above in your browser using DataLab