Learn R Programming

clustrd (version 1.0.2)

plot.cluspca: Plotting function for cluspca() output.

Description

Plotting function that creates a ggplot2 scatterplot of the objects, a correlation circle of the variables or a biplot of both objects and variables.

Usage

"plot"(x, dims = c(1, 2), disp = TRUE, cludesc = FALSE, what = c(TRUE,TRUE), ...)

Arguments

x
Object returned by cluspca()
dims
Numerical vector of length 2 indicating the dimensions to plot on horizontal and vertical axes respectively; default is first dimension horizontal and second dimension vertical
disp
A logical value indicating whether the plots are shown in the R window or saved as PDF files in the working directory (default = TRUE)
what
Vector of two logical values specifying the contents of the plots. First entry indicates whether a scatterplot of the objects is displayed and the second entry whether a correlation circle of the variables is displayed. The default is c(TRUE, TRUE) and the resultant plot is a biplot of both objects and variables
cludesc
A logical value indicating if a parallel plot showing cluster means is produced (default = FALSE)
...
Further arguments to be transferred to cluspca()

References

De Soete, G. and Carroll, J. D. (1994). K-means clustering in a low-dimensional Euclidean space. In Diday E. et al. (Eds.), New Approaches in Classification and Data Analysis, Heidelberg: Springer, 212-219.

Vichi, M. and Kiers, H.A.L. (2001). Factorial K-means analysis for two-way data. Computational Statistics and Data Analysis, 37, 49-64.

See Also

plot.clusmca

Examples

Run this code
data("iris", package = "datasets")
outclusPCA = cluspca(iris[,-5], 3, 2, alpha = 0.3, rotation = "varimax")
table(outclusPCA$cluID,iris[,5])
plot(outclusPCA, cludesc = TRUE)

Run the code above in your browser using DataLab