nndup: Determine duplicates in nearest neighbor list

View source: R/nndup.R

nndupR Documentation

Determine duplicates in nearest neighbor list

Description

nndup determines the indices of duplicated elements for a nearest neighbors list created by a function such as nnpop or knn. The indices are related to the list returned by nn2zones.

Usage

nndup(nn, N = max(unlist(nn)))

Arguments

nn

A list of nearest neighbors.

N

The largest value in nn.

Value

A logical vector of indicating duplicate indices.

Examples

nn <- list(1:3, c(2:1, 4))
nndup(nn, 4)

jfrench/smerc documentation built on Oct. 27, 2024, 5:13 p.m.