View source: R/plot.trajClusters.R
| plot.trajClusters | R Documentation |
trajClusters objectPlots the curves corresponding to (or closest to) the centroids of the clusters and plots a random sample from each groups.
## 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)
#The pointwise mean trajectories correspond to the third and fourth displayed plots.
c4 = trajClusters(m, nclusters = 4)
plot(c4, which.plots = 3:4)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.