Description Usage Arguments Value Examples
View source: R/rasterLocalMoments.R
rasterLocalMoments
finds the local moments within the weighted neighborhood
of W.
1 | rasterLocalMoments(r, WMu, WVar = WMu, moments = 2)
|
r |
An in memory raster image. |
WMu |
A matrix of weights. The mean kernel will be applied to each
pixel in |
WVar |
A matrix of weights. The variance kernel will be applied at each centroid. Dimensions must be non-zero and odd. Only non-missing neighbors are used in the variance. The dimensions of WVar must match WMu. |
moments |
The number of moments to calculate. The local spatial mean will be calculated when moments=1. The local spatial mean and variance wil be calculated when moments=2. Currently no higher moments are supported. |
A list of in memory raster images, one list element for each moment.
1 2 3 | r <- raster::raster( matrix(rnorm(36),6,6))
W <- matrix(1,3,3)
rLocalMoments <- rasterLocalMoments(r,W)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.