angleCells | R Documentation |
Compute the angle between the displacement vectors of two tracks in the dataset,
or of several such pairs at once.
Note that in contrast to distanceCells
, this angle is computed even
when the two tracks do not share any time points.
angleCells(X, cellids, degrees = TRUE)
X |
a tracks object |
cellids |
a vector of two indices specifying the tracks to get steps from, or a dataframe/matrix of two columns (where every row contains a pair of cellids to compute an angle for) |
degrees |
logical; should angle be returned in degrees instead of radians? (defaults to |
A single angle (if two cellids given), or a vector of angles (if multiple pairs of cellids are supplied).
distanceCells
to compute the minimum distance between the tracks,
and AngleAnalysis
for other methods to compute angles and distances.
## Find the angle between the tracks with ids 1 and 3
angleCells( TCells, c("1","3") )
## Find the angles of several cell pairs at once
pairs <- data.frame( cell1 = c("1","1"), cell2 = c( "3","4" ) )
angleCells( TCells, pairs )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.