## Decathlon example from the documentation of the 'FactoMineR' package library(FactoMineR) data(decathlon) es.pca = PCA(decathlon[ , 1:10], scale.unit=TRUE, ncp=5, graph=T) #decathlon: the data set used #scale.unit: to choose whether to scale the data or not #ncp: number of dimensions kept in the result #graph: to choose whether to plot the graphs or not res.pca = PCA(decathlon[,1:12], scale.unit=TRUE, ncp=5, quanti.sup=c(11: 12), graph=T) #decathlon: the data set used #scale.unit: to choose whether to scale the datas or not #ncp: number of dimensions kept in the result #quanti.sup: vector of the indexes of the quantitative supplementary variables #graph: to choose whether to plot the graphs or not plot.PCA(res.pca, axes=c(1, 2), choix="ind", habillage="ind")#13) #res.pca: the result of a PCA #axes: the axes to plot #choix: the graph to plot ("ind" for the individuals, "var" for the variables) #habillage: to choose the colours of the individuals: no colour ("none"), a colour for each individual ("ind") or to colour the individuals according to a categorical variable (give the number of the qualitative variable) dimdesc(res.pca, axes=c(1,2)) #res.pca: the result of a PCA #axes: the axes chosen