I want to select small region in the first raster and calculate the spatial average for that region and do the same for the other 11 rasters. so will finally get 12 values.
I tried this:
sami<- list.files("C:\\New folder (3)", "*.envi", full.names = TRUE)
saf=stack(sami)
plot(saf, 1) ## to select a region
e <- drawExtent()## I selected the region
saf_test <- crop(saf, e)
is this right to do so?
Then how I calculate the spatial average for the selected region?and do the same for all other rasters. Thanks in advance.