rpart function from the library
rpart will be used to obtain the first classification tree. The tree will be visualized by using the plot options of
rpart, and we will follow this up with extracting the rules of a tree by using the
asRules function from the
rpartpackage by using
CART_Dummy_rpart <- rpart(Y~ X1+X2,data=CART_Dummy).
Now, the classification tree flows as follows. ...