0

Is it possible to graph the decision tree for more than 3 levels in R?

I used rpart.plot to graph it and 2 of my target value levels were not displayed.

I have entered my coding that way. How would I modify it to plot 5 layers and which package must I add?

fit <- rpart (Range~., data =x_test, method = 'class') 
rpart.plot(fit, type=5,extra = 106) 
Jason Aller
  • 3,541
  • 28
  • 38
  • 38
julia
  • 21
  • 5
  • [See here](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) on making an R question that folks can help with. That includes a sample of data, all necessary code, and a clear explanation of what you're trying to do and what hasn't worked. – camille Nov 20 '19 at 17:42

1 Answers1

0

The argument: snip, is set to false by default. Set it to true, to interactively trim the tree with the mouse.