Skip to content

Instantly share code, notes, and snippets.

@monogenea
Created October 7, 2019 19:06
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 monogenea/e8401589fed7456281b629e71500fb20 to your computer and use it in GitHub Desktop.
Save monogenea/e8401589fed7456281b629e71500fb20 to your computer and use it in GitHub Desktop.
dev.off() # clear the format from the previous plot
winePCA <- prcomp(scale(wine[,-1]))
plot(winePCA$x[,1:2], col = wineClasses)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment