An extension to mean
for objects of class winmove
Arguments
- 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=circle
, the radius of the circle (in units of the CRS). Iftype=rectangle
the dimension of the rectangle (one or two numbers)- type
character. The shape of the moving window
Examples
# load required data
data(cont_ls)
# convert data to object of class winmove
cont_ls <- new("winmove", cont_ls)
#> Error in methods::slot(value, what): no slot of name "srs" for this object of class "RasterLayer"
# aggregate using a circular window with radius 3
d <- mean(cont_ls, d = 3, type = "circle")
#> Warning: argument is not numeric or logical: returning NA