I need to stack some rasters in a loop like:
for(month in 1:12){
.
.
.
"some algorithm spiting out a raster called 'sm_esa'"
sm_esa_stack<-stack(sm_esa)
}
In the end I'd like to create a stack with 12 layers (one month each). But my last line obviously overwrites with every new raster rather than stacks on. Any hint?