From yinnerspace at gmail.com  Mon Mar  5 00:04:08 2012
From: yinnerspace at gmail.com (yindalon)
Date: Sun, 4 Mar 2012 15:04:08 -0800 (PST)
Subject: [Rd] rpart package, text function, and round of class counts
Message-ID: <1330902248616-4444576.post@n4.nabble.com>

I run the following code:

library(rpart)
data(kyphosis)
fit <- rpart(Kyphosis ~ ., data=kyphosis)
plot(fit)
text(fit, use.n=TRUE)

The text labels represent the count of each class at the leaf node.
Unfortunately, the numbers are rounded and in scientific notation rather
than the exact number of examples sorted by that node in each class. 

The plot is supposed to look like
http://www.statmethods.net/advstats/images/ctree.png as per
http://www.statmethods.net/advstats/cart.html.

I'm running 2.14.1 on a mac.

Can anyone verify or point out if I am doing something obviously wrong for
displaying the counts rounded and in scientific notation rather than the
true counts in each class at each node?
Thanks.

--
View this message in context: http://r.789695.n4.nabble.com/rpart-package-text-function-and-round-of-class-counts-tp4444576p4444576.html
Sent from the R devel mailing list archive at Nabble.com.



[Rd] rpart package, text function, and round of class counts
yindalon