Description Usage Arguments Value Examples
an efficient function to find the neighborhood based on the matrix of position and a pre-defined cutoff
1 | getneighborhood_fast(x, cutoff)
|
x |
is a n-by-2 matrix of position. |
cutoff |
is a threashold of Euclidean distance to decide whether a spot is an neighborhood of another spot. For example, if the Euclidean distance between spot A and B is less than cutoff, then A is taken as the neighbourhood of B. |
A sparse matrix containing the neighbourhood
1 2 | pos = cbind(rep(1:5, each=5), rep(1:5, 5))
Adj = getneighborhood_fast(pos, 2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.