Re: [Rd] unexpected behavior of rpart 3.1-43, loss matrix

2009-05-05 Thread Liaw, Andy
Andy > -Original Message- > From: r-devel-boun...@r-project.org > [mailto:r-devel-boun...@r-project.org] On Behalf Of Lars > Sent: Thursday, April 30, 2009 12:43 PM > To: r-devel@r-project.org > Subject: [Rd] unexpected behavior of rpart 3.1-43, loss matrix > > Hi, &

[Rd] unexpected behavior of rpart 3.1-43, loss matrix

2009-05-01 Thread Lars
Hi, I just noticed that rpart behaves unexpectecly, when performing classification learning and specifying a loss matrix. if the response variable y is a factor and if not all levels of the factor occur in the observations, rpart exits with an error: > df=data.frame(attr=1:5,class=factor(c(2,3,