Hello. I have a hudge problem, don't know how to deal with it... I'm supposed to implement a tree structure in R, without using rpart library... I don't have any clue about appropriate approach... Anyway, I can't use pointers under R...so how to to it? lists, vectors... Anyway, does anybody knows how the regression tree in rpart was implemented... Someone please help! Thanks, ana
how to construct tree under R
3 messages · ANA KOZOMARA, Marc Feldesman, Ko-Kang Kevin Wang
On Sat, 17 May 2003 19:19:49 +0200, an incredible array of electrons randomly cascading around the Universe collided and turned into words spewed forth by ANA KOZOMARA: ANA> Hello. ANA> I have a hudge problem, don't know how to deal with it... ANA> I'm supposed to implement a tree structure in R, without using ANA> rpart library... ANA> I don't have any clue about appropriate approach... ANA> Anyway, I can't use pointers under R...so how to to it? ANA> lists, vectors... ANA> Anyway, does anybody knows how the regression tree in rpart was ANA> implemented... ANA> Someone please help! You might look at the source code, which is available with the library. You could also look at the technical report available on CRAN (package sources), which explains the way the program works. If all else fails, you could also look at Breiman et al, "Classification and Regression Trees" which is the canonical source for this. HTH
Hi,
On Sat, 17 May 2003, ANA KOZOMARA wrote:
I have a hudge problem, don't know how to deal with it... I'm supposed to implement a tree structure in R, without using rpart library...
I'm not sure what exactly you want here. If you want to write a function that uses some kind of algorithms on decision trees (e.g. CART) then you will have to consult some technical books. If you are just working on a practical problem, i.e. you have got a data set and just want to get a tree from it, then the tree or rpart package are two of the packages you can use (and you can consult "Modern Applied Statistics with S" by Venables and Ripley, 2002). I am not sure why you do not want to use the rpart package, but the tree package has some very good documentation which you can read and find out how to use it.
Cheers, Kevin ------------------------------------------------------------------------------ /* Time is the greatest teacher, unfortunately it kills its students */ -- Ko-Kang Kevin Wang Master of Science (MSc) Student SLC Tutor and Lab Demonstrator Department of Statistics University of Auckland New Zealand Homepage: http://www.stat.auckland.ac.nz/~kwan022 Ph: 373-7599 x88475 (City) x88480 (Tamaki)