Learn R Programming

celltrackR (version 1.2.1)

distanceCells: 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)

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.

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.

See Also

angleCells to compute the angle between the track displacement vectors, and AngleAnalysis for other methods to compute angles and distances.

Examples

Run this code
## Find the minimum distance between the tracks with ids 1 and 3
distanceCells( TCells, c("1","3") )

Run the code above in your browser using DataLab