I have a stack of monthly temperature raster data and would like to calculate the global spatial mean per area using the
terra package in R to obtain a monthly time series.
terra::mean but they both give me a raster with a temporal average per gridcell, not the spatial average.
terra::extract might be another solution but I can't seem to get it to work, since I am interested in the global mean.
This feels like a very basic thing to do so apologies if it is obvious. Any tips appreciated.