Last data update: 2014.03.03

R: Nearest neighbor of individuals based on a dissimilarity...
getnnsR Documentation

Nearest neighbor of individuals based on a dissimilarity matrix

Description

Get nearest neighbor of individuals and the dissimilarity between individuals and his nearest neighbor

Usage

getnns(diss, flag)

Arguments

diss

a dissimilarity matrix

flag

a vector of size n which indicates if we want to compute nearest neighbor of individual i (flag[i]=1) or not (flag[i]=0)

Value

nn

a vector of size n which indicates who is the nearest neighbor

nndiss

value of the dissimilarity between individuals an their nearest neighbors

Results