Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have several rasters that I want to do some calculations ,basically calculating the moving average.

   class       : RasterStack 
   dimensions  : 720, 1440, 1036800, 601  (nrow, ncol, ncell, nlayers)
   resolution  : 0.25, 0.25  (x, y)
   extent      : -180, 180, -90, 90  (xmin, xmax, ymin, ymax)
  coord. ref. : +proj=longlat +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +no_defs 

I am gratful to anyhelp

share|improve this question
Have you calculated statistics on your output (…)? Sometimes you need to do this manually before you can get sensible summaries. – MappaGnosis Mar 19 '13 at 21:29
why are you doing 2 times stack ? – A.R Apr 5 '13 at 16:15
up vote 1 down vote accepted

The NA's here refer to the fact that the min and max value are unknown (this is no longer the case in the current version of 'raster'). Your function should work if you use 'calc' instead of 'overlay'

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.