focalfast: Calculate focal Analysis

Description Usage Arguments Value Author(s) Examples

Description

Execute a funciton over a focal window

Usage

1
2
3
focalfast(r, window.size, fun = function(x) {
    mean(x, na.rm = TRUE)
})

Arguments

r

a raster

window.size

the number of cells that you would like the focal window to be, must be odd

fun

function to calculate in the focal analysis

Value

Returns a raster

Author(s)

Connor F. White and Meghan Blumstein

Examples

1
2
3
4
5
6
7
#library(raster)
#r<-matrix(rnorm(10000),nrow=100,ncol=100)
#r<-raster(r)

#map<-focalfast(r=r,windowsize=4,fun=mean)

#image(map)

ConnorFWhite/AssFunc documentation built on May 20, 2019, 4:07 p.m.