Created
October 4, 2018 08:50
-
-
Save srishtis/81018d5d99df4e33c3604739a5e63f37 to your computer and use it in GitHub Desktop.
Performing PCA with covariance matrix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Setting the scale=FALSE option will use the covariance matrix to get the PCs | |
cars.PC.cov = prcomp(mtcars[,-11], scale=FALSE) # sellecting the 11 columns by indexing mtcars |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment