nndup: Determine duplicates in nearest neighbor list

Description Usage Arguments Value Examples

View source: R/nndup.R

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

1
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

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

smerc documentation built on Oct. 1, 2021, 5:07 p.m.