viz_pca.Rd
Vizualize principal pomponents
viz_pca(data, label, components = c(1, 2), loadings = FALSE)
data | A data.frame. |
---|---|
label | variable to color with. |
components | principal components to showcase. |
loadings | Set this to true if you want to see the PCA loadings. |
ggplot2 object.
viz_pca(iris, Species)viz_pca(iris, Species, loadings = TRUE)