Last chance! 50% off unlimited learning
Sale ends in
setZ(x, z, name='time')
getZ(x)
r <- raster(ncol=10, nrow=10)
s <- stack(lapply(1:3, function(x) setValues(r, runif(ncell(r)))))
s <- setZ(s, as.Date('2000-1-1') + 0:2)
s
getZ(s)
Run the code above in your browser using DataLab