[Rd] rpart: ylim problem in plotcp (PR#13530)

jgvcqa at rit.edu jgvcqa at rit.edu
Mon Feb 16 01:40:07 CET 2009

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

# 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

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

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

More information about the R-devel mailing list