require (datasets)
data (iris)
pca = PCA (iris, quali.sup = 5)
plot (pca) # Automatically colored/legended by the qualitative supplementary variable
plot (pca, type = "cor")
plot (pca, type = "eig")
# Overriding colors and point styles manually (e.g. by an external clustering)
km = KMEANS (iris [, -5], k = 3)
plot (pca, col = km$cluster + 1, pch = km$cluster + 1)
Run the code above in your browser using DataLab