[R] help with plot.rpart

mark at statcourse.com mark at statcourse.com
Fri Jul 29 17:11:36 CEST 2011


   Ã  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]milbo at sonic.net>
   Date: Fri, July 29, 2011 7:54 am
   To: <[2]mark at statcourse.com>
   Cc: <[3]sarah.goslee at gmail.com>
   Mark, check out my rpart.plot package. See also the PDF vignette that comes
   with the package.
   Steve
   [4]www.milbo.users.sonic.net
   ------------------------------------------------------------------
   Message: 69
   Date: Thu, 28 Jul 2011 16:10:35 -0400
   From: Sarah Goslee <[5]sarah.goslee at gmail.com>
   To: [6]mark at statcourse.com
   Cc: [7]r-help at r-project.org
   Subject: Re: [R] help with rpart
   Message-ID:
   <[8]CAM_vjukbUphEmRDs231LpiZwS7xdKMMK3_7s5mz=yDtTVhthog at 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]mark at statcourse.com> 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]http://www.functionaldiversity.org

References

   1. mailto:milbo at sonic.net
   2. mailto:mark at statcourse.com
   3. mailto:sarah.goslee at gmail.com
   4. http://www.milbo.users.sonic.net/
   5. mailto:sarah.goslee at gmail.com
   6. mailto:mark at statcourse.com
   7. mailto:r-help at r-project.org
   8. mailto:CAM_vjukbUphEmRDs231LpiZwS7xdKMMK3_7s5mz=yDtTVhthog at mail.gmail.com
   9. mailto:mark at statcourse.com
  10. http://www.functionaldiversity.org/


More information about the R-help mailing list