Category:Pre-processing in R: Principal Components (PCA)

Package stats:

The prcomp function is used in calculating PCA for data. The (cor) argument indicates whether the calculation should use the correlation matrix or the covariance matrix

prc <- prcomp(data, cor=F)

summary(prc, scale =TRUE)  --- to see the summary of the results

plot(prc)  for plotting the PCA