distanceCells {celltrackR} | R Documentation |
Minimum Distance between Two Cells
Description
Compute the minimum distance between two cells in the dataset (minimum over all) the timepoints where they were both measured.
Usage
distanceCells(X, cellids, quietly = FALSE)
Arguments
X |
a tracks object |
cellids |
a vector of two indices specifying the tracks to compute distance between, or a dataframe/matrix of two columns (where every row contains a pair of cellids to compute a distance for) |
quietly |
if TRUE, suppress warnings about returning NA distances. |
Value
A single distance (NA if the the tracks do not have overlapping timepoints), or
a vector of such distances if multiple pairs are supplied in cellids
.
See Also
angleCells
to compute the angle between the track displacement vectors,
and AngleAnalysis
for other methods to compute angles and distances.
Examples
## Find the minimum distance between the tracks with ids 1 and 3
distanceCells( TCells, c("1","3") )
[Package celltrackR version 1.2.0 Index]