Skip to content

Instantly share code, notes, and snippets.

@wabarr
Created March 11, 2017 14:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wabarr/ed1e290937e07345fc2e035cdd17c7a5 to your computer and use it in GitHub Desktop.
Save wabarr/ed1e290937e07345fc2e035cdd17c7a5 to your computer and use it in GitHub Desktop.
library(factoextra)
PCA <- prcomp(iris[,1:4], scale=T)
fviz(PCA, "var")
fviz(PCA, "ind", repel=T, habillage = iris$Species, label='none')
fviz_ellipses(PCA,habillage = iris$Species, ellipse.type = "convex", geom="point") +
labs(title="mytitle")
@wabarr
Copy link
Author

wabarr commented Mar 11, 2017

this shows how to plot PCA variables, as well as individuals and to plot minimum convex hulls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment