View source: R/cluster-functions.R
getFeatureMatrix | R Documentation |
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.
getFeatureMatrix(tracks, measures, dist = FALSE, ...)
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" |
A matrix with a row for each track and a column for each measure.
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.
## Get speed, meanTurningAngle, and straightness for T cell tracks
fm <- getFeatureMatrix( TCells, c(speed,meanTurningAngle,straightness))
str(fm)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.