From jgvcqa at rit.edu  Mon Feb 16 01:40:07 2009
From: jgvcqa at rit.edu (jgvcqa at rit.edu)
Date: Mon, 16 Feb 2009 01:40:07 +0100 (CET)
Subject: [Rd] rpart: ylim problem in plotcp (PR#13530)
Message-ID: <20090216004008.07891282EFC1@mail.pubhealth.ku.dk>

Full_Name: Joe Voelkel
Version: 2.8.1
OS: Window
Submission from: (NULL) (70.100.144.240)


# Use of ylim in plotcp generates this message
# Error in plot.default [more stuff]
#  formal argument "ylim" matched by multiple actual arguments

# Here is how to generate the bug (which the plotcp function tries to handle)
#   and how to patch it--but at the loss of dots in plot

library(rpart)
fit <- rpart(Kyphosis ~ Age + Number + Start, data=kyphosis)
windows(5,5)
plotcp(fit)
plotcp(fit,ylim=c(0,2))  # generates error message

plotcp2<-plotcp
fix(plotcp2) # I removed ,... from the plot function
plotcp2(fit)
plotcp2(fit,ylim=c(0,2)) # patch works, but at cost of removing dots from plot



[Rd] rpart: ylim problem in plotcp (PR#13530)
jgvcqa at rit.edu