[R] problems with arrangement of figures by layout function

Weidong Gu wgu at uab.edu
Wed Feb 25 22:47:42 CET 2009


Hi,

I want to have histograms behind the regression tree figure.

Since 7 leafs resulted from the tree model (rpart), it would be nice to
have correspondent histograms below the tree figure. After a little
study, I could generate the correspondent histogram for each leaf, but
can't figure out how to arrange them in the right place. I tried
something like

>layout(rbind(c(1,1,1,1,1,1,1),c(2,3,4,5,6,7,8)))# the first row for
tree
>plot(tree,uniform=T,branch=0.5,margin=0,compress=T)
>histogram(IncU|where)

But the last command ignores the layout arrangement. How can I get
around the problem? 

Thanks in advance

Weidong Gu
Department of Medicine
UAB

 



More information about the R-help mailing list