Description Usage Arguments Value Examples
Calculate focal ("moving window") weight matrix for use in the focal function. The sum of the values adds up to one.
| 1 | focalWeight(x, d, type=c('circle', 'Gauss', 'rectangle'))
 | 
| x | Raster* object | 
| d | numeric. If  | 
| type | character indicating the type of filter to be returned | 
matrix that can be used in focal
| 1 2 3 | r <- raster(ncols=36, nrows=18, xmn=0)
# Gaussian filter for square cells
gf <- focalWeight(r, 2, "Gauss")
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.