nearest {BIDistances}R Documentation

Nearest

Description

returns the index of the nearest neighbour of a given data point.

Usage

nearest(Data, i, defined)

Arguments

Data

A matrix holding n data points as row vectors.

i

the index of the data point, who's nearest neighbour is sought.

defined

A row vector with 1 for all columns of data that are used for the computation. If missing, all columns are used.

Value

nNInd

The index of the nearest neighbour of data[i, ]

Author(s)

Michael Thrun, Raphael Paebst

Examples

nearest(Data = as.matrix(iris[,1:4]), i = 1)

[Package BIDistances version 0.1.3 Index]