Learn R Programming

spots (version 0.1.0)

HnnNeighborIndex: Hexagonal nearest neighbor index

Description

Get hexagonal nearest neighbor indices.

Usage

HnnNeighborIndex(dist.hnn, k, include.self = TRUE)

Arguments

dist.hnn

A hexagonal nearest neighbor distance matrix.

k

Number of neighbors.

include.self

Whether to include self as 1st neighbor, default is TRUE.

Value

An n x k matrix for the nearest neighbor indice.