Assuming I have these 3 rasters:
library(raster) r1 <- r2 <- r3 <- raster(ncol=10, nrow=10) r1[] <- runif(ncell(r1))
And I have t