[Rd] rpart:plotcp doesn't allow ylim argument (PR#1171)

Warnes, Gregory R gregory_r_warnes@groton.pfizer.com
Thu, 15 Nov 2001 09:28:15 -0500


Hi Brain,

The reason for specifying ylim is to allow me to generate these plots for
several different trees and compare them side by side.  Its hard to do that
properly if the plots are on different scales.

While the help page doesn't say explicitly that it allows ylim, it does say
that "..." are "additional plotting parameters" which often means that the
standard plotting parameters will get handled properly.

-Greg

 > -----Original Message-----
 > From: ripley@stats.ox.ac.uk [mailto:ripley@stats.ox.ac.uk]
 > Sent: Thursday, November 15, 2001 4:25 AM
 > To: r-devel@stat.math.ethz.ch
 > Cc: R-bugs@biostat.ku.dk
 > Subject: Re: [Rd] rpart:plotcp doesn't allow ylim argument (PR#1171)
 > 
 > 
 > It doesn't say it allows ylim, either. Why would you want to do this?
 > 
 > rpart is a port of code written for S-PLUS 6: that has been 
 > finalized last
 > week and rpart version 3.1-3 is the result.  It's been very difficult
 > tracking the changes, and I am not prepared to diverge the R 
 > port from the
 > original except where essential.   (By no means all changes 
 > I feed back get
 > incorporated.)
 > 
 > You'll need to convince me that this is essential.
 > 
 > On Wed, 14 Nov 2001 gregory_r_warnes@groton.pfizer.com wrote:
 > 
 > > Full_Name: Gregory R. Warnes
 > > Version: R 1.3.1
 > > OS: Solaris 2.8
 > > Submission from: (NULL) (192.77.198.200)
 > >
 > >
 > > rpart library version 3.1-2
 > >
 > > Error message:
 > > > plotcp(fit.thirds.1,ylim=c(0.7,1.5));
 > > Error in plot.default(ns, xerror, axes = FALSE, xlab = 
 > "cp", ylab = "X-val
 > > Relative Error",  :
 > > 	formal argument "ylim" matched by multiple actual arguments
 > > >
 > >
 > > This can be corrected by adding  ylim to the list of 
 > formal argument and
 > > wrapping
 > > the definition of ylim with 'if(missing(ylim))'.  Patch below.
 > >
 > > -Greg
 > >
 > > ---PATCH STARTS HERE---
 > > diff -r rpart.orig//R/plotcp.s rpart/R/plotcp.s
 > > 5c5
 > > < 		   upper=c("size", "splits", "none"), ...)
 > > ---
 > > > 		   upper=c("size", "splits", "none"), ylim, ...)
 > > 18c18,19
 > > <   ylim <- c(min(xerror - xstd) - 0.1, max(xerror + xstd) + 0.1)
 > > ---
 > > >   if(missing(ylim))
 > > >     ylim <- c(min(xerror - xstd) - 0.1, max(xerror + xstd) + 0.1)
 > >
 > >
 > > 
 > -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
 > .-.-.-.-.-.-.-.-.-
 > > r-devel mailing list -- Read 
 > http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
 > > Send "info", "help", or "[un]subscribe"
 > > (in the "body", not the subject !)  To: 
 > r-devel-request@stat.math.ethz.ch
 > > 
 > _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
 > ._._._._._._._._._
 > >
 > 
 > --
 > Brian D. Ripley,                  ripley@stats.ox.ac.uk
 > Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
 > University of Oxford,             Tel:  +44 1865 272861 (self)
 > 1 South Parks Road,                     +44 1865 272860 (secr)
 > Oxford OX1 3TG, UK                Fax:  +44 1865 272595
 > 
 > 
 > -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
 > .-.-.-.-.-.-.-.-.-
 > r-devel mailing list -- Read 
 > http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
 > Send "info", "help", or "[un]subscribe"
 > (in the "body", not the subject !)  To: 
 > r-devel-request@stat.math.ethz.ch
 > _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
 > ._._._._._._._._._
 > 


LEGAL NOTICE
Unless expressly stated otherwise, this message is confidential and may be privileged. It is intended for the addressee(s) only. Access to this E-mail by anyone else is unauthorized. If you are not an addressee, any disclosure or copying of the contents of this E-mail or any action taken (or not taken) in reliance on it is unauthorized and may be unlawful. If you are not an addressee, please inform the sender immediately.
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._