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

ripley@stats.ox.ac.uk ripley@stats.ox.ac.uk
Thu, 15 Nov 2001 10:25:12 +0100 (MET)


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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._