Description Usage Arguments Value Examples
This is a wrapper around raster::focal
, to apply the function on stars
objects without needing to convert to and from a Raster*
object.
1 | raster_focal(x, w, fun, na.rm = FALSE)
|
x |
A |
w |
A matrix of weights (the moving window), e.g. a 3 by 3 matrix with values 1 |
fun |
A function. The function fun should take multiple numbers, and return a single number |
na.rm |
If |
A stars
object with the filtered output
1 2 3 4 5 6 7 8 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.