View source: R/angle-functions.R
pairsByTime | R Documentation |
For every timepoint in the dataset, compute pairwise distances between coordinates.
pairsByTime(X, searchRadius = Inf, times = timePoints(X), quietly = FALSE)
X |
a tracks object |
searchRadius |
if specified, return only pairs that are within this distance of each other.
Defaults to |
times |
(optional) a vector of timePoints to check pairs at; by default this is just everything. |
quietly |
(default FALSE) if TRUE, suppress warnings when there are no tracks with overlapping timepoints and an empty dataframe is returned. |
a dataframe with the following columns:
the id of the track to which the first coordinate belongs
the id of the track to which the second coordinate belongs
the time point at which their distance is assessed
the distance between the coordinates at this time
## compute find timepoints where two t cells are within 1 micron of each other.
pairsByTime( TCells, searchRadius = 1 )
## indeed, the following two cells nearly touch:
plot( TCells[ c("24","9258") ] )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.