[R] rpart: plot without scientific notation
Adalberto Pineda
adapineda at corelogic.com
Sat Feb 4 02:18:02 CET 2012
Stephen: I tried running your script but couldn't make it work (any feedback
is welcome) so I changed it a little bit. I found you still need to set the
# of digits as the max # of possible digits of your yval response or
greater.
node.fun <- function(x)
{
x$frame$yval<-as.integer(sprintf("%0.f", x$frame$yval))
x
}
plot(node.fun(tree), compress=TRUE)
text(node.fun(tree), digits = 15)
--
View this message in context: http://r.789695.n4.nabble.com/rpart-plot-without-scientific-notation-tp3767975p4356308.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list