[R] Principal comp. scores in R

Simon Blomberg Simon.Blomberg at anu.edu.au
Thu Jan 30 05:04:03 CET 2003


Try:

res <- princomp(X, scores = TRUE)
res$scores

Cheers,

Simon.

Simon Blomberg
Depression & Anxiety Consumer Research Unit
Centre for Mental Health Research, Australian National University
Simon.Blomberg at anu.edu.au  +61 (2) 6125 3379


-----Original Message-----
From: kenneth fortino [mailto:k_fortino at hotmail.com]
Sent: Thursday, 30 January 2003 2:49 PM
To: r-help at stat.math.ethz.ch
Subject: [R] Principal comp. scores in R



Hello,  I am trying to run a PCA in R and I cannot get the PC scores for 
each of the values.  Using pcX <- princomp(X) then loadings(pcX) I can get a 
listing of the eigenvectors but not the actual PC scores for each value in 
the dataset.  I greatly appreciate any help anyone can offer

Thanks
Ken

______________________________________________
R-help at stat.math.ethz.ch mailing list
http://www.stat.math.ethz.ch/mailman/listinfo/r-help




More information about the R-help mailing list