My current code plots a decision tree with labels displayed on the right side of the arrows. However, I want the True
label to go on the left side. How does one achieve this?
library(data.tree)
tree <- Node$new("Are you happy?")
leaf1 <- tree$AddChild("Party")
leaf2 <- tree$AddChild("Take a nap")
SetEdgeStyle(leaf1, color = "black", label = "True", penwidth = 1, fontcolor = "black")
SetEdgeStyle(leaf2, color = "black", label = "False", penwidth = 1, fontcolor = "black")
plot(tree)