focalValues(x, ...)
r
. row number (this is a required argument).
2) ngb
. The neighborhood to consider. Either a single integer or a vector of two integers. Default is 3.cellValues
, xyValues
, polygonValues
, focal
x <- raster(nrow=10, ncol=10)
x[] <- 1:ncell(x)
focalValues(x, r=5)
Run the code above in your browser using DataLab