Your plot only shows part of the tree provided by print(fit). I would like to plot the entire tree.
-------- Original Message -------- Subject: Re: [R] help with plot.rpart From: Joshua Wiley <[1][email protected]> Date: Fri, July 29, 2011 8:25 am To: [2][email protected] Cc: [3][email protected] Mark, The below is not directly reproducible. There is no "MV" or "PT" variable in the dataset you reference. I am assuming you meant: dat <- read.table("http://statcourse.com/research/boston.csv", , sep=",", header = TRUE) fit ><- rpart(MEDV ~ CRIM + ZN + INDUS + CHAS + NOX + RM + AGE + DIS + RAD + TAX + PTRATIO + B + LSTAT, data = dat) plot(fit) which creates the plot I attached. Cheers, Josh On Fri, Jul 29, 2011 at 8:11 AM, ><[4][email protected]> wrote: > > Ã data=read.table("http://statcourse.com/research/boston.csv", , sep=",", > header = TRUE) > > Ã library(rpart) > > Ã fit=rpart (MV~ CRIM+ZN+INDUS+CHAS+NOX+RM+AGE+DIS+RAD+TAX+ PT+B+LSTAT) > > Please: Show me the tree. > > Mark > > -------- Original Message -------- > Subject: Re: [R] help with rpart > From: "Stephen Milborrow" <[1][5][email protected]> > Date: Fri, July 29, 2011 7:54 am > To: <[2][6][email protected]> > Cc: <[3][7][email protected]> > Mark, check out my rpart.plot package. See also the PDF vignette that comes > with the package. > Steve > [4][8]www.milbo.users.sonic.net > ------------------------------------------------------------------ > Message: 69 > Date: Thu, 28 Jul 2011 16:10:35 -0400 > From: Sarah Goslee <[5][9][email protected]> > To: [6][10][email protected] > Cc: [7][11][email protected] > Subject: Re: [R] help with rpart > Message-ID: > <[8][12]CAM_vjukbUphEmRDs231LpiZwS7xdKMMK3_7s5mz=ydttvht...@mail.gmail.com> > Content-Type: text/plain; charset=ISO-8859-1 > Why repost after receiving a reply? Reposting is unnecessary. If the > first reply was unsatisfactory, why? More detail in your question > leads to a more useful and informative reply. > Just in case you didn't get it: > On Thu, Jul 28, 2011 at 11:52 AM, <[9][13][email protected]> wrote: > > 1. How can I plot the entire tree produced by rpart? > What is plot() not doing that you need? > > 2. How can I submit a vector of values to a tree produced by rpart and > > have > > it make an assignment? > What is predict() not doing that you need? > -- > Sarah Goslee > [10][14]http://www.functionaldiversity.org > > References > > 1. [15]mailto:[email protected] > 2. [16]mailto:[email protected] > 3. [17]mailto:[email protected] > 4. [18]http://www.milbo.users.sonic.net/ > 5. [19]mailto:[email protected] > 6. [20]mailto:[email protected] > 7. [21]mailto:[email protected] > 8. [22]mailto:CAM_vjukbUphEmRDs231LpiZwS7xdKMMK3_7s5mz=ydttvht...@mail.gmail.co m > 9. [23]mailto:[email protected] > 10. [24]http://www.functionaldiversity.org/ > ______________________________________________ > [25][email protected] mailing list > [26]https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide [27]http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > -- Joshua Wiley Ph.D. Student, Health Psychology University of California, Los Angeles [28]https://joshuawiley.com/ References 1. http://[email protected]/ 2. mailto:[email protected] 3. mailto:[email protected] 4. mailto:[email protected] 5. mailto:[email protected] 6. mailto:[email protected] 7. mailto:[email protected] 8. http://www.milbo.users.sonic.net/ 9. mailto:[email protected] 10. mailto:[email protected] 11. mailto:[email protected] 12. mailto:CAM_vjukbUphEmRDs231LpiZwS7xdKMMK3_7s5mz=ydttvht...@mail.gmail.com 13. mailto:[email protected] 14. http://www.functionaldiversity.org/ 15. mailto:[email protected] 16. mailto:[email protected] 17. mailto:[email protected] 18. http://www.milbo.users.sonic.net/ 19. mailto:[email protected] 20. mailto:[email protected] 21. mailto:[email protected] 22. mailto:CAM_vjukbUphEmRDs231LpiZwS7xdKMMK3_7s5mz=ydttvht...@mail.gmail.com 23. mailto:[email protected] 24. http://www.functionaldiversity.org/ 25. mailto:[email protected] 26. https://stat.ethz.ch/mailman/listinfo/r-help 27. http://www.R-project.org/posting-guide.html 28. https://joshuawiley.com/ ______________________________________________ [email protected] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.

