Learn R Programming

celltrackR (version 1.2.1)

getFeatureMatrix: 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, ...)

Value

A matrix with a row for each track and a column for each measure.

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"

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

Run this code
## Get speed, meanTurningAngle, and straightness for T cell tracks
fm <- getFeatureMatrix( TCells, c(speed,meanTurningAngle,straightness))
str(fm)

Run the code above in your browser using DataLab