[R] biplot package

Jari Oksanen jari.oksanen at oulu.fi
Tue Jun 5 11:45:03 CEST 2007

joseclaudio.faria <joseclaudio.faria <at> terra.com.br> writes:

> Dears,
> I've been learning biplot (Gabriel, 1971) and I found the function 'biplot',
inside of the package 'stats',
> useful but, a bit limited.
> So, I'm thinking to start a colaborative package to enhance this methods to
other multivariate methods. In this
> way, I would like to start it, making public a new function (biplot.pca, still
in development, but running)
> that make biplot more simple and power.
> All users are free to modify and make it better.
> Below the function and a small script to learn it.
Dear Jose Claudio Faria,

Looks nice. However, I'd suggets you articulate this into R core and tradition.
There the biplot function is now defined as:

biplot <- function (x, ...)  UseMethod("biplot")

with methods("biplot")
[1] biplot.default*  biplot.prcomp*   biplot.princomp*

You function is now called biplot.pca which sounds like biplot method for the
class "pca" (which, I think, exists in labdsv and perhaps somewhere else). What
you do is to propose a biplot method for class-less function svd. Or perhaps
this could be something like biplot.data.frame so that this function is launched
when user supplies as a data.frame as the first argument for biplot.

The good old R tradition is to separate plotting from calculation so that you
can have these separately (which obviously is related to the unix toolbox
thinking: do one thing well, and pipe the result to the next function). It might
make sense to have a biplot method for data.frame (if I remember correctly, some
of the core members fancied a spanning tree method for data.frame which is along
similar lines). However, I would like to have enhanced biplot methods for other
methods as well, such as analyses using prcomp or princomp, or multivariate
analyses in packages. There is no sense to replicate all mv analyses within
biplot functions, but you should just try cope with the outputs of various
methods. Then you perhaps have to change the name so that you can have
biplot.prcomp alongside with your new hyperbiplot.prcomp. (Namespace is an
answer to no real problem, but a reason of many new problems.) 

Somebody already promised to write a biplot method for rda in vegan (howdy Gav),
but I haven't heard of this for a long time. It would be nice to be able to have
this kind of interface for your enhanced code, too. 

cheers, jari oksanen

More information about the R-help mailing list