Re: [R] problem in labeling the nodes of tree drawn by rpart

2009-12-09 Thread Terry Therneau
In the nodes of the tree, the values of the covariates are represented with a, b or c (tree attached). Try help('text.rpart'), and note the 'pretty' argument therein. There is often not enough room for long labels, and so the default is to do the severe truncation you speak of. Terry Therneau

[R] problem in labeling the nodes of tree drawn by rpart

2009-12-08 Thread kaida ning
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

Re: [R] problem in labeling the nodes of tree drawn by rpart

2009-12-08 Thread Frank E Harrell Jr
Depending on your sample size, you might be able to just label the nodes by drawing a random sample from the variable names :-) Frank kaida ning wrote: 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

[R] problem in labeling the nodes of tree drawn by rpart

2009-12-07 Thread kaida ning
Hi all, I used rpart to fit a model, where the covariates in the model 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. Is there a way to show