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
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
----- Original Message ----- From: "Marc Feldesman" <feldesmanm at pdx.edu> To: <r-help at stat.math.ethz.ch> Sent: Saturday, May 17, 2003 7:52 PM Subject: Re: [R] how to construct tree under R> > > 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. > > HTHThanks for your advices...but, but, but...the whole day i was trying to understand the source code of the rpart function... i mean, if it's what obtained by typing>rpart in R-prompt...sorry, if I pose stupid questions, but R is really new to me... I don't even know what's> also look at Breiman et al, "Classification > and Regression Trees".a book...? I don't think that, here in France I could get it...:(... So, my stupid question is, how do I get the source code of R functions...? Well, thanks a lot again, ana> > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://www.stat.math.ethz.ch/mailman/listinfo/r-help
Sorry, didn't mean to make you mad... unfortunately, at the moment i don't think i can afford it, and in my university library there are no books concerning R... Anyway, I'm sorry if I'm bugging you with the questions... (actually, I even tried to install today one library which I think was written by you..."tree")...anyway it didn't work, so I suppose that speaks of my niveau..Too bad there is no mailing list for a real R beginers... I'm kidding, best regard, anyway, thaks for the answers, ana> > Why not? What is special about France? The book in published in theUSA,> so you could order it from there. > > > So, my stupid question is, how do I get the source code of Rfunctions...?> > Well, thanks a lot again, > > In the R sources, which are on CRAN, as Marc said. > > You get with R the technical support you paid for: you might be betteroff> buying a commercial program and using its paid-for technical support. > > -- > Brian D. Ripley, ripley at stats.ox.ac.uk > Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ > University of Oxford, Tel: +44 1865 272861 (self) > 1 South Parks Road, +44 1865 272866 (PA) > Oxford OX1 3TG, UK Fax: +44 1865 272595 > >
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)
Hey guys, thanks a lot for your understanding and advices. Anyway, I suceed to make something like tree-structure under R...list of lists... because my problem was not which algorithm to use to construct the regression tree, but which data structure to choose.... Nevermind, best wishes, thanks a lot again, ana ----- Original Message ----- From: "Uwe Ligges" <ligges at statistik.uni-dortmund.de> To: "ANA KOZOMARA" <magnolia at absolutok.net> Sent: Sunday, May 18, 2003 11:48 AM Subject: Re: [R] how to construct tree under R> > > ANA KOZOMARA wrote: > > > > Sorry, didn't mean to make you mad... > > unfortunately, at the moment i don't think i can afford it, > > and in my university library there are no books concerning R... > > Anyway, I'm sorry if I'm bugging you with the questions... > > (actually, I even tried to install today one library which I think was > > written > > by you..."tree")...anyway it didn't work, so I suppose that speaks of my > > niveau..Too bad there is no mailing list for a real R beginers... > > I'm kidding, > > best regard, > > anyway, thaks for the answers, > > ana > > [not to R-Help - you already forwarded Brian's message to r-help which > was private!] > > Ana, > > in your library are no books concerning R? The two books from Venables > and Ripley are very famous and "Modern Applied Statistics with S" ist > the best sold Springer book in Statistics, AFAIK. So it's your turn make > a suggestion to the library people to buy it! > The book > Breiman, Friedman, Olshen, and Stone (1984): > Classification and Regression Trees. Wadsworth. > is THE book defining CART (and therefore the similar implementation of > rpart, which was implemented by Terry M Therneau and Beth Atkinson at > Mayo - there was a Technical Report on this, AFAIK). > > Anyway, there are some manuals coming with R, for a beginner: "An > Introduction to R", "R Data Import/Export", ans "R Language Definition". > Also, reading the FAQs is a good idea. > Since all people answering mails on R-help are volunteers, they don't > want to answer extremly basic questions that are obvious from reading > the manuals. > > Your idea to type in rpart was OK. Better idea: Look in the package > structure of the package sources and look for the relevant file *.R with > R Code, and *.c, *.f for the C and Fortran sources that are the basic of > the DLL which the R Code uses. > > Uwe Ligges