Hi,

The "xtable" method for "summary.prcomp" is just creating a table of the 
"importance" values.  So you can get the same table for just a few of the PCs 
by subscripting the importance values:

    xtable(mySummary$importance[,1:2],digits=4)

Best,
Charlie

-----Original Message-----
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On 
Behalf Of Riccardo Romoli
Sent: 22 February 2012 23:22
To: r-help@r-project.org
Subject: [R] xtable prcomp

Hi, I need to export to LaTex the summary of a PCA. So:

myPCA <- prcomp(myDF)
mySummary <- summary(myPCA)
#
print(xtable(mySummary))

How can I export to LaTeX not all the summary but only the first nPCs??

Best
Riccardo

______________________________________________
R-help@r-project.org mailing list
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.
LEGAL NOTICE
This message is intended for the use o...{{dropped:10}}

______________________________________________
R-help@r-project.org mailing list
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.

Reply via email to