View source: R/plot.trajClusters.R
| plot.trajClusters | R Documentation |
trajClusters objectplot() sequentially plots (i) the clusters centroids, (ii) a random sample of trajectories from each cluster, and (iii) the median of each standardized measure by cluster. (scatterplots() displays the two dimensional projections of the standardized data in feature space for every pair of measures. CVIplot() graphs the internal cluster validity indices as a function of the number of clusters as well as the result of the ranked voting system for determining the optimal number of clusters.
## S3 method for class 'trajClusters'
plot(x, sample.size = 5, ask = TRUE, which.plots = NULL, ...)
scatterplots(x, ask = TRUE, which.scatter = NULL, N = NULL, ...)
CVIplot(x, ...)
x |
object of class |
sample.size |
the number of trajectories to be randomly sampled
from each clusters. If |
ask |
logical. If |
which.plots |
either |
... |
other parameters to be passed through to plotting functions. |
which.scatter |
either |
N |
the maximum number of points present in each scatter plots. If a non |
## Not run:
data("trajdata")
trajdata.noGrp <- trajdata[, -which(colnames(trajdata) == "Group")] #remove the Group column
m = trajMeasures(trajdata.noGrp, ID = TRUE)
c3 = trajClusters(m, nclusters = 3)
plot(c3, which.plots = 1, ask= FALSE) ## centroids
plot(c3, which.plots = 2, ask= FALSE) ## sample trajectories
plot(c3, which.plots = 3, ask= FALSE) ## median of standardized measures by cluster
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.