0

I have to draw arrows with branches between two nodes in a decision tree

prp(ntree, type=4, extra=105, branch=0.8,
  box.col="grey", tweak=1.2,
  round=2, leaf.round =2, branch.lty=8, split.fun = split.fun, 
  faclen = 0, clip.facs = TRUE, 
  facsep = " or ", gap=0, space = 0, 
  arrows(x0, y0, x1, y1))

I want a graph like this one:

Graph

How to call arrows function in rpart.plot?

Abdessabour Mtk
  • 3,895
  • 2
  • 14
  • 21
  • It's easier to help you if you include a simple [reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) with sample input and desired output that can be used to test and verify possible solutions. – MrFlick Nov 13 '20 at 18:56
  • prp(ntree, type=4, extra=105, branch=0.8, box.col="grey", tweak=1.2, round=2, leaf.round =2, branch.lty=8, split.fun = split.fun, faclen = 0, clip.facs = TRUE, facsep = " or ", gap=0, space = 0) – user14545212 Nov 13 '20 at 19:22
  • I want a graph like this. – user14545212 Nov 13 '20 at 19:23
  • 1
    Please edit your question to include code and data (don't add this info in comments because it can't be as nicely formatted). – MrFlick Nov 13 '20 at 19:29

1 Answers1

0

Arrows are not yet supported by rpart.plot (package version 3.0.9, Sep 2020).

Stephen Milborrow
  • 976
  • 10
  • 14