I've read similar questions about that here, but still didn't work for my problem. I have a table with: columns with different kinds of pollutants levels and a column with the name of the samples. However, in no way I can change the name of the labels (now it's numbers) to the samples names.
Here is my script:
read.csv2("PCA_ALL.csv", header=TRUE)->tabela
tabela
pca <- prcomp(~Ter+Hop+UCM+AHS+S_Chain+L_chain+Alkyl+HMW+LMW+TOC, scale = TRUE)
fviz_pca_biplot(pca, geom = c("point","text"),
addEllipses = TRUE, ggtheme = theme_gray(),
col.var = "black", repel=FALSE,
title = "PCA - GB", xlab="PC1 (39%)", ylab="PC2 (22%)")
Does anyone know what I could do? Thanks in advance!
The first column of my table is named "area", where the name of the samples are.