raster (version 1.9-41)

focal_old: Focal (old functions)

Description

These functions are depracated. They have been replaced by the new focal function (with slightly different arguments). focal_old was called focal in previous versions and is still included to compare with and transition to the new function.

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

x
A RasterLayer object
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.
...
additional arguments

Value

  • RasterLayer

See Also

focal