View source: R/calc_functions.R
mean | R Documentation |
An extension to mean
for objects of class winmove
mean(x, ...)
## S3 method for class 'winmove'
mean(x, d, type, ...)
x |
RasterLayer. The data over which to calculate the mean value within a moving window |
... |
further arguments passed to or from other methods |
d |
numeric. If |
type |
character. The shape of the moving window |
RasterLayer. A smoothed raster with the mean calculated within the specified moving window
# load required data
data(cont_ls)
# convert data to object of class winmove
cont_ls <- new("winmove", cont_ls)
# aggregate using a circular window with radius 3
d <- mean(cont_ls, d = 3, type = "circle")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.