find_neighbors {BayesSpace} | R Documentation

## Compute pairwise distances between all spots and return list of neighbors for each spot.

### Description

Compute pairwise distances between all spots and return list of neighbors for each spot.

### Usage

    find_neighbors(positions, radius, method = c("manhattan", "euclidean"))

### Arguments

`positions` | (n x 2) matrix of spot coordinates.
`radius` | The maximum distance for two spots to be considered neighbors.
`method` | Distance metric to use.

### Value

List df_j, where `df_j[[i]]` is a vector of zero-indexed neighbors of i.

[Package BayesSpace version 1.0.0 Index]