Christoph Lehmann wrote:
Hi

is there a way to plot only the loadings in a biplot (with the nice arrows), and to skip the scores?

thanks
christoph


Hi Christoph,

Three options I can think of:

1) Hack the source for biplot.princomp and biplot.default (which does the plotting) by commenting out the lines that plot the scores or altering the code to plot only the scores. You want to plot just y[,1] against y[,2] and ignore the x[,1] and x[,2] bits in biplot.default.

2) Write your own function based on biplot.default and biplot.princomp

3) If you don't like hacking/coding then see package vegan and the function scores, which has a method for class princomp, which can extract the loadings and the scores (in princomp terms, vegan calls them something else). Function ordiplot (also in vegan) provides direct plotting of various ordination results including objects from princomp.

All the best,

Gav

--
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
Gavin Simpson                     [T] +44 (0)20 7679 5522
ENSIS Research Fellow             [F] +44 (0)20 7679 7565
ENSIS Ltd. & ECRC                 [E] [EMAIL PROTECTED]
UCL Department of Geography       [W] http://www.ucl.ac.uk/~ucfagls/cv/
26 Bedford Way                    [W] http://www.ucl.ac.uk/~ucfagls/
London.  WC1H 0AP.
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%

______________________________________________
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to