Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Performing PCA with covariance matrix
# 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