data(centaurea)
centaurea = naMeanSubst(centaurea)
centaurea = removePopulation(centaurea, populationName = c("LIP", "PREL"))
pcaRes = pca.calc(centaurea)
plotPoints(pcaRes, axes = c(1,2), col = c("red", "green", "blue", "red"),
pch = c(20, 17, 8, 21), pt.bg = "orange", legend = TRUE, legend.pos = "bottomright")
plotPoints(pcaRes, main = "My PCA plot", cex = 0.8)
cdaRes = cda.calc(centaurea)
plotPoints(cdaRes, col = c("red", "green", "blue", "red"),
pch = c(20, 17, 8, 21), pt.bg = "orange", legend = TRUE)
Run the code above in your browser using DataLab