Skip to content
Prev 8348 / 29559 Next

Extracting a z-subset from a rasterStack object

I'm thinking I'm missing something obvious -- if I want to make a new
raster stack which is a subset of another raster stack, how do I go
about doing this?  Neither of these worked:

data_sub=stack(data_stack,bands=c(10,20))
data_sub=stack(data_stack,index=c(10,20))

data_stack is a rasterStack of 1500 layers...

Thanks!

--j