gaussian.kernel: Gaussian Kernel

View source: R/gaussian.kernel.R

gaussian.kernelR Documentation

Gaussian Kernel

Description

Creates a Gaussian Kernel of specified size and sigma

Usage

gaussian.kernel(sigma = 2, s = 5)

Arguments

sigma

sigma (standard deviation) of kernel (defaults 2)

s

scale defining the number of rows and columns for kernel (default 5)

Value

Symmetrical (NxN) matrix of a Gaussian distribution

Author(s)

Jeffrey S. Evans <jeffrey_evans@tnc.org>

Examples

opar <- par()
  par(mfrow=c(2,2))
  persp(gaussian.kernel(sigma=1, s=27), theta = 135, 
        phi = 30, col = "grey", ltheta = -120, shade = 0.6, 
        border=NA )
  persp(gaussian.kernel(sigma=2, s=27), theta = 135, phi = 30,
        col = "grey", ltheta = -120, shade = 0.6, border=NA )	
  persp(gaussian.kernel(sigma=3, s=27), theta = 135, phi = 30,
        col = "grey", ltheta = -120, shade = 0.6, border=NA )	
  persp(gaussian.kernel(sigma=4, s=27), theta = 135, phi = 30,
        col = "grey", ltheta = -120, shade = 0.6, border=NA )	
 par(opar) 			

spatialEco documentation built on Nov. 18, 2023, 1:13 a.m.