Best Answer · By JanBask Data Science Expert
Answered on Nov 5, 2019
Below is the code.

There is no such hard and fast rule for this problem but one possible approach is to use the snip argument of rpart.plot
The below code can solve the problem.

This puts the tree on the screen, which we can manually prune with the help of the mouse.