Create a decision tree in R based on df

Hi there. I would like to plot a decision tree based on some information that I have in a dataframe like this:

df<-data.frame(action=c("C","F","R","RC","RF","X"), 
               value=c(-10,-60,30,1,-2,1))

Each letter is related to an action that we made in a poker hand:
C is for Call
F is for Fold
R is for Raise
X is for Check.

I would like to create a decision tree to plot this information in order to find any inconsistency in my decitions. Something like this:

image

How would you do this? There is any package that you would recommend?

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.