Skip to content
Back to formatted view

Raw Message

Message-ID: <20090216004008.07891282EFC1@mail.pubhealth.ku.dk>
Date: 2009-02-16T00:40:07Z
From: jgvcqa at rit.edu
Subject: rpart: ylim problem in plotcp (PR#13530)

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