[R] prcomp() on correlation matrix
bgunter.4567 at gmail.com
Wed Nov 9 17:57:48 CET 2016
Well, it seems you can't -- prcomp() seems to want the data matrix.
But it would be trivial using svd() -- or possibly even eigen() -- if
you understand the underlying linear algebra.
"The trouble with having an open mind is that people keep coming along
and sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
On Wed, Nov 9, 2016 at 4:45 AM, T.Riedle <tr206 at kent.ac.uk> wrote:
> Dear R users,
> I am trying to do a Principal Components Analysis using the prcomp() function based on the correlation matrix. How can I determine to calculate PCA on a correlation or covariance matrix using prcomp()?
> Thanks in advance.
> [[alternative HTML version deleted]]
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help