Hi to everyone,
How can I add names from first column to my PCA map plot? Need help
library(ggplot2)
library("FactoMineR")
library("factoextra")
decathlon2<- read.csv("PCA2_data.csv", TRUE, ",")
decathlon2.active <- decathlon2[1:414, 1:10]
head(decathlon2.active[, 1:10], 414)
res.pca <- PCA(decathlon2.active, graph = FALSE)
Color by cos2 values: quality on the factor map
fviz_pca_var(res.pca, col.var = "cos2",
gradient.cols = c("#00AFBB", "#E7B800", "#FC4E07"),
repel = TRUE # Avoid text overlapping
)
fviz_pca_ind(res.pca, col.ind = "cos2",
gradient.cols = c("#00AFBB", "#E7B800", "#FC4E07"),
repel = TRUE # Avoid text overlapping (slow if many points)
)