Description Usage Arguments Details Value Author(s) Examples

Get a list of neighborhoods, each containing the `k`

nearest neighbors (not including itself) to a point in the data set.

1 | ```
neighborhoods(data, k, indices, eps=0.0)
``` |

`data` |
A data set. |

`k` |
The number of neighbors in each neighborhood. |

`indices` |
A vector with indices of the points in |

`eps` |
If non-zero, the relative error in distance allowed when finding nearest neighbors. See Details. |

The `ann`

function of the package `yaImpute`

is used for finding the `k`

nearest neighbors. The `eps`

parameter to `neighborhoods`

is used in the `ann`

function.

A list of neighborhoods where each item corresponds to one index in `indices`

and each item contains a data set with `k`

data points.

Kerstin Johnsson, Lund University

1 2 | ```
data <- swissRoll3Sph(300, 300)
neighborhoods(data, 10, 1:10)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.