Hi all, I used rpart to fit a model, where the covariates are categorical variables. Then I plotted the tree (mytree) and used the command "text" to add labels to the tree.
In the nodes of the tree, the values of the covariates are represented with a, b or c (tree attached). Is there a way to show the real value(s) of the variable in the nodes instead of a, b or c ? I found that the command "labels(mytree,minlength=3)" can give me the desired label, but I don't know how to add it to the tree. Best, Kaida
tree.pdf
Description: Adobe PDF document
______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.