From p.dalgaard at biostat.ku.dk  Mon Jun  2 17:16:29 2003
From: p.dalgaard at biostat.ku.dk (Peter Dalgaard BSA)
Date: Mon Jun  2 18:16:32 2003
Subject: [Rd] mva:princomp.default not set correctly (PR#3168)
In-Reply-To: <Pine.LNX.4.44.0306021650130.21914-100000@gannet.stats>
References: <Pine.LNX.4.44.0306021650130.21914-100000@gannet.stats>
Message-ID: <x2vfvofnxe.fsf@biostat.ku.dk>

Prof Brian Ripley <ripley@stats.ox.ac.uk> writes:

> This is not about princomp.default at all!  That snippet of code does not
> appear there.
> 
> Please do check against the S-PLUS original of biplot.default: this is in
> biplot.default.  I very much doubt if you understand the intentions
> (not that I do either).

Sorry, Brian, but: Pot, kettle....

> > The offending bit of code from mva:princomp.default seems to be
> > 
> >     if (missing(xlim) && missing(ylim)) 
> >         xlim <- ylim <- rangx1 <- rangx2 <- range(rangx1, rangx2)
> >     else if (missing(xlim)) 
> >         xlim <- rangx1
> >     else ylim <- rangx2

As far as I can see, this is not equivalent to S-PLUS's logic. For
that, the 3rd line should read

        if (!missing(ylim))

So in S-PLUS, xlim gets ignored if ylim is specified, whereas in R it
is vice versa. I suspect that neither case is desirable? 

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk)             FAX: (+45) 35327907


[Rd] mva:princomp.default not set correctly (PR#3168)
Peter Dalgaard BSA