find_neighbors: Compute pairwise distances between all spots and return list...

Description Usage Arguments Value

View source: R/utils.R

Description

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

Usage

1
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.


BayesSpace documentation built on Nov. 8, 2020, 8:03 p.m.