Skip to content

Instantly share code, notes, and snippets.

@srishtis
Created October 5, 2018 05:24
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 srishtis/0991a0f4ebdc2dedc2bfb3b6064ec20c to your computer and use it in GitHub Desktop.
Save srishtis/0991a0f4ebdc2dedc2bfb3b6064ec20c to your computer and use it in GitHub Desktop.
This snippet performs the PCA on correlation matrix
# scale=TRUE performs the PCA using the correlation matrix
cars.PC.cor = prcomp(mtcars[,-11], scale=TRUE)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment