Learn R Programming

smerc (version 1.8.3)

nndup: 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)))

Value

A logical vector of indicating duplicate indices.

Arguments

nn

A list of nearest neighbors.

N

The largest value in nn.

Examples

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

Run the code above in your browser using DataLab