[R] body of non-visible function

From: Anna Oganyan <aoganyan_at_niss.org>
Date: Fri 06 May 2005 - 00:42:00 EST


Hello,
Is there any possibility in R to see the body of the “non-visible” function, for
example “princomp”?
If I do :

> methods(princomp)

so, I get that princomp.default and princomp.formula are non-visible functions and
body(princomp.default) doesn’t show it.

In particular, I guess I have a very naïve question… I’d like to see how scores calculation is implemented in the function princomp. Because when I multiply my data matrix on the matrix of loadings
>data.matrix %*% princomp(data.matrix, scores=T)$loadings

I get different result than just doing

>princomp(data.matrix, scores=T)$scores.

Thanks.
Anna



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Fri May 06 01:09:10 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:31:36 EST