getFeatureMatrix {celltrackR} | R Documentation |
Obtaining A Feature Matrix
Description
Applies a given vector of track measures directly on a set of tracks, returning output in a matrix with a column for each measure and a row for each track. Can also return a distance matrix, which some clustering methods require.
Usage
getFeatureMatrix(tracks, measures, dist = FALSE, ...)
Arguments
tracks |
the tracks that are to be analyzed. |
measures |
a function, or a vector of functions (see TrackMeasures). Each function is expected to return a single number given a single track. |
dist |
should a distance matrix rather than a feature matrix be returned? |
... |
further arguments passed on to "dist" |
Value
A matrix with a row for each track and a column for each measure.
See Also
clusterTracks
for a quick method to compute the feature
matrix and a clustering, and trackFeatureMap
to perform
dimensionality reduction methods on a set of track features.
Examples
## Get speed, meanTurningAngle, and straightness for T cell tracks
fm <- getFeatureMatrix( TCells, c(speed,meanTurningAngle,straightness))
str(fm)
[Package celltrackR version 1.2.0 Index]