Usage
focal_old(x, ngb=3, fun=mean, na.rm=TRUE, filename="", ...)
focalFilter(x, filter, fun=sum, filename="", na.rm=FALSE, pad=TRUE, padValue=NA, ...)
Arguments
ngb
Neighborhood size. A neighborhood is expressed in number of cells in a single direction or in two direction from the focal cell
fun
The function to be applied. The function fun should take multiple numbers, and return a single number and accept argument na.rm
na.rm
Logical. If TRUE
, NA
will be removed from focal computations
filename
Output filename for a new raster
filter
a matrix of weights. See Details
pad
Boolean. If TRUE
, additional 'virtual' rows and columns are padded to x
such that there are no edge effects.
padValue
Boolean. The value of the cells of the padded rows and columns.