Hi,
I haven't used the focal function in raster, which should be able to do
this, but in the RSAGA package there is a function called focal.function
that does the same thing on ASCII grids. In your case this should work:
focal.function("dem",fun="max",radius=3,mw.to.vector=TRUE,mw.na.rm=TRUE)
I am seeing RASTER package and "focal". I have a raster ascii grid format
with a Z value. I am trying to do a mobile window with a specific radius
(es: 10 m) to find the pixel with the max value of Z inside the window. I
need to do this operation for each pixel and save a a new grid with only the