HnnWeight: Hexagonal nearest neighbor weight

View source: R/hnn.R

HnnWeightR Documentation

Hexagonal nearest neighbor weight

Description

Calculate hexagonal nearest neighbor weights using Gaussian filter.

Usage

HnnWeight(dist.hnn, dist.k = NULL, mu = 0, sigma = 1)

Arguments

dist.hnn

A hexagonal nearest neighbor distance matrix.

dist.k

The maximum distance used to calculate the weight. Default is NULL and all neighbor weights are calculated.

mu

The mean of Gaussian filter, default is 0.

sigma

The standard deviation of Gaussian filter, default is 1.

Value

A weight matrix.

Examples

{
data.use <- quakes[1:100,]
dist.use <- as.matrix(dist(data.use[,1:2]))
res <- HnnWeight(dist.use, mu = 0, sigma = 0.5)
}


stevexniu/spots documentation built on July 30, 2022, 9:21 a.m.