tree.
hist.tree(tree, ..., nodes, screen.arg = <<see below>>,
figs = c(1, length(vnames)), plot = T)
"tree".
This is assumed to be the result of some function that produces
an object with the same
components as that returned by the
tree function.
names attribute of the data frame used in fitting
tree.
split.screen and
tree.screens for more details.
c(n,m) where
n and
m are integers.
nodes is given, should the histogram be plotted?
plot=FALSE)
list with names from
... for the last node selected interactively
or the one given in the argument
nodes.
Each component of this list is a list itself with two components
with names
x (the values going left) and
y (the values going right).
...,
a horizontal histogram of the
observations going left is placed opposite to a histogram of the observations
going to the right.
This function checks that the user is in split-screen mode.
A dendrogram of
tree is expected to be visible on the current active screen,
and a graphics input device (for example, a mouse) is required.
Clicking the selection button on a node results in the additional screens
being filled with the information described above.
This process may be repeated any number of times.
Warnings result from selecting leaf nodes.
Clicking the exit button will stop the display process
and return the list described above for the last node selected.
See
split.screen for specific details on graphic input
and split-screen mode.
You may need to
attach the original data frame prior to using this function.
z <- tree(Mileage~ Weight + Type, car.test.frame) tree.screens() plot(z) ; text(z) hist.tree(z, Weight, Mileage) # click on node to produce histogram