Re: [R] Regression Tree Questions

2018-02-24 Thread Jeff Newmiller
As Bert implies, you may be getting ahead of yourself. An 8 may be a number, or it may be the character 8, or it could be a factor, and you don't seem to know the difference yet (thus suggesting tutorials). If you go to the trouble of making a reproducible example [1][2][3] then you may find the

Re: [R] Regression Tree Questions

2018-02-24 Thread Bert Gunter
But note that converting it e.g. via as.numeric() would be disastrous: > as.numeric(factor(c(3,5,7))) [1] 1 2 3 The OP may need to do some homework with R tutorials to learn about basic R data structures; or if he has already done this, he may need to be more explicit about how the data were crea

Re: [R] Regression Tree Questions

2018-02-24 Thread José María Mateos
On Sat, Feb 24, 2018 at 01:16:27PM -0600, Gary Black wrote: > Hi All, > > I'm a newbie and have two questions. Please pardon me if they are very basic. > > > 1. I'm using a regression tree to predict the selling prices of 10 new > records (homes). The following code is resulting in an error

[R] Regression Tree Questions

2018-02-24 Thread Gary Black
Hi All, I'm a newbie and have two questions. Please pardon me if they are very basic. 1. I'm using a regression tree to predict the selling prices of 10 new records (homes). The following code is resulting in an error message: pred <- predict(model, newdata = outOfSample[, -6]) The error