View source: R/plot.trajClusters.R
plot.trajClusters | R Documentation |
trajClusters
objectsPlots the cluster-specific median and mean trajectories and a random sample of trajectories from each cluster.
## S3 method for class 'trajClusters'
plot(x, sample.size = 5, ask = TRUE, which.plots = NULL, spline = FALSE, ...)
scatterplots(x, ask = TRUE, ...)
critplot(x, ...)
x |
object of class |
sample.size |
the number of random trajectories to be randomly sampled
from each cluster. Defaults to |
ask |
logical. If |
which.plots |
either |
spline |
logical. If |
... |
other parameters to be passed through to plotting functions. |
Step3Clusters
## Not run:
data("trajdata")
trajdata.noGrp <- trajdata[, -which(colnames(trajdata) == "Group")] #remove the Group column
m = Step1Measures(trajdata.noGrp, ID = TRUE)
s = Step2Selection(m)
c3 = Step3Clusters(s, nclusters = 3)
plot(c3)
#The pointwise mean trajectories correspond to the third and fourth displayed plots.
c4 = Step3Clusters(s, 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.