Description Usage Arguments Details Value Examples
Perform a hierarchical clustering of a set of tracks according to a given vector of track measures.
1 | clusterTracks(tracks, measures, scale = TRUE, ...)
|
tracks |
the tracks that are to be clustered. |
measures |
a function, or a vector of functions (see TrackMeasures). Each function is expected to return a single number given a single track. |
scale |
logical indicating whether the measures values shall be scaled
using the function |
... |
additional parameters to be passed to |
The measures are applied to each of the tracks in the given
tracks object. According to the resulting values, the tracks are
clustered using a hierarchical clustering (see hclust
).
If scale
is TRUE
, the measure values are scaled to mean value
0 and standard deviation 1 (per measure) before the clustering.
An object of class *hclust*, see hclust
.
1 2 3 4 5 6 7 8 9 10 | ## Cluster tracks according to the mean of their Hust exponents along X and Y
cells <- c(TCells,Neutrophils)
real.celltype <- rep(c("T","N"),c(length(TCells),length(Neutrophils)))
## Prefix each track ID with its cell class to evaluate the clustering visually
names(cells) <- paste0(real.celltype,seq_along(cells))
clust <- clusterTracks( cells, hurstExponent )
plot( clust )
## How many cells are "correctly" clustered?
sum( real.celltype == c("T","N")[cutree(clust,2)] )
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.