Last chance! 50% off unlimited learning
Sale ends in
drawExtent(show=TRUE, col="red")
TRUE
, the bounding box will be drawn on the mapr1 <- raster(nrow=10, ncol=10)
r1[] <- runif(ncell(r1))
#plot(r1)
#bb <- drawExtent()
#mean(values(crop(r1, drawExtent())))
Run the code above in your browser using DataLab