data(centaurea)
centaurea = naMeanSubst(centaurea)
centaurea = removePopulation(centaurea, populationName = c("LIP", "PREL"))
pcaRes = pca.calc(centaurea)
plotPoints(pcaRes, col = c("red", "green", "blue", "red"),
pch = c(20, 17, 8, 21), pt.bg = "orange", legend = FALSE)
plotAddLegend(pcaRes, x = "bottomright", col = c("red", "green", "blue", "red"),
pch = c(20, 17, 8, 21), pt.bg = "orange", ncol = 2)
Run the code above in your browser using DataLab