Re: [R] biplot & identify

From: Gavin Simpson <gavin.simpson_at_ucl.ac.uk>
Date: Fri 23 Jul 2004 - 20:07:48 EST

Wolski wrote:
> Hi!
>
> Is there a way to get biplot and identify to work togheter.
>
> Having the output of prcomp I would like to draw a biplot that.
> Instead of plotting the sample (row-names) names plots some "pch"
> symbols. (thats easy with xlabs)
>
> But now I would like to add using identify the names to only some of
> the points. I have noticed that both biplot.prcomp and biplot.default
> does a lot of scaling.
>
> So has anyone a function like identify.prcomp please?
>
>
> Is it possible?

Yes, take a look at Jari Oksanen's vegan package http://cc.oulu.fi/~jarioksa/softhelp/vegan.html and on CRAN.

The ordiplot function can be used to plot ordination diagrams including those from prcomp. There is an identify method for ordiplot that allows you to label points - you need to store the ordiplot object before using identify, e.g.:

exmp.pc <- prcomp(some.data)
exmp.ord <- ordiplot(exmp.pc)
identify(exemp.ord, what = "sites")

see ?ordiplot and the example which includes the use of identify.

> Sincerely Eryk

HTH Gav

-- 
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
Gavin Simpson                     [T] +44 (0)20 7679 5522
ENSIS Research Fellow             [F] +44 (0)20 7679 7565
ENSIS Ltd. & ECRC                 [E] gavin.simpson@ucl.ac.uk
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.
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Fri Jul 23 20:26:13 2004

This archive was generated by hypermail 2.1.8 : Wed 03 Nov 2004 - 22:55:11 EST