[R] Comparing loadings (next to each other)
Adam D. I. Kramer
adik at ilovebacon.org
Sun Jul 19 00:55:54 CEST 2009
Dear colleagues,
I've been running some principal components analyses, which generate
tables of loadings that I'm interested in looking at.
print(f1$rot$load,cutoff=.4) is what I use, and it gives me what I want.
However, I'm now interested in comparing these loadings across a few
data sets. In other words, I would like R to match the loadings on
rownames() and display them next to each other, e.g.:
Loadings:
PC 1 PC 2 PC 1 PC 2 PC 1 PC 2
col1 0.40 0.45 0.90
col2 0.80 0.55
col3 0.77 0.70 0.42
...I could certainly just cbind them together, but then I can't class them
as loadings:
> class(x) <- loadings
Error in class(x) <- loadings :
cannot coerce type 'closure' to vector of type 'character'
...and I'm very interested in using the "cutoff" feature of print.loadings.
Any suggestions? I could go in and alter print.loadings myself, but if
there's an easier way let me know.
Many thanks,
--
Adam D. I. Kramer
adik at uoregon.edu
Ph.D. Candidate, Social and Personality Psycholgoy
University of Oregon
More information about the R-help
mailing list