[R] Calculating different PCAs in R

Adams, Jean jvadams at usgs.gov
Wed Apr 1 15:06:32 CEST 2015


PCA 1, 2, and 3 refer to the scores not the loadings.
Check out the help for princomp.

?princomp

pc.cr <- princomp(USArrests, cor = TRUE)
pc.cr$scores[1:3, ]

Jean


On Tue, Mar 31, 2015 at 4:26 PM, im db <imdb.subscribe at gmail.com> wrote:

> Dear All, I want to use princomp() function in R in order to calculate
> Principle Component Analysis.In different papers, I have seen "PCA 1", "PCA
> 2", "PCA 11" , etc. Would you please tell me how can i calculate different
> PCAs in R?At the moment i just use this line "eigenVectors <-
> pca$loadings"But I don’t know if it is correct to use loadings.Thank you in
> advance.  Best regards,
> Iman Dabbaghi
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

	[[alternative HTML version deleted]]



More information about the R-help mailing list