Learn R Programming

miceFast (version 0.9.1)

neibo: Finding in random manner one of the k closest points in a certain vector for each value in a second vector

Description

This function uses pre-sorting of y and binary search to find one of the k closest values for each miss.

Usage

neibo(y, miss, k)

Value

a numeric vector

Arguments

y

numeric vector values to be looked up

miss

numeric vector values to be looked for

k

integer number of nearest neighbours to sample from