getAdj_auto {DR.SC} | R Documentation |
Calculate adjacency matrix by automatically choosing radius
Description
an efficient function to find the radius by bi-section method , then find neighbors based on the matrix of position, which ensures that each spot has approximately lower.med~upper.med neighbors in the sense of median.
Usage
getAdj_auto(pos, lower.med=4, upper.med=6, radius.upper= NULL)
Arguments
pos |
a n-by-2 matrix of position. |
lower.med |
an integer, the lower bound of median number of neighbors among all spots. |
upper.med |
an integer, the upper bound of median number of neighbors among all spots. |
radius.upper |
a real, the upper bound of radius, default as NULL. If |
Value
A sparse adjacency matrix containing the neighbourhood.
See Also
[Package DR.SC version 3.4 Index]