How to plot the 2nd and 3rd principle component after using prcomp.
More variance is explained by the 2nd and 3rd principle component on my variables of greatest interest.
Here is the code im using for the 1st and 2nd.
res.pca <- prcomp(data3, scale = TRUE)
fviz_eig(res.pca)
fviz_pca_ind(res.pca,
col.ind = "cos2", # Color by the quality of representation
gradient.cols = c("#00AFBB", "#E7B800", "#FC4E07"),
repel = TRUE # Avoid text overlapping
)