snip.arbor(x, toss)
arbor
. This is assumed to be the result
of some function that produces an object with the same named
components as that returned by the
arbor
function.
arbor
object containing the nodes that remain after specified or
selected subtrees have been snipped off.
A dendrogram of
tree
is expected to be visible on the graphics device,
and a graphics input device (e.g., a mouse) is required. Clicking
(the selection button) on a node displays the node number, sample
size, response yvalue, and Error (dev). Clicking a second time on the
same node snips that subtree off and visually erases the subtree.
This process may be repeated an number of times. Warnings result from
selecting the root or leaf nodes. Clicking the exit button will stop
the snipping process and return the resulting
arbor
object.
See the documentation for the specific graphics device for details on
graphical input techniques.
z.survey <- arbor(market.survey) # grow the arbor object plot(z.survey) # plot the tree text(z.survey) # add text to tree z.survey2 <- snip.arbor(z.survey,toss=2) # trim subtree at node 2 plot(z.survey2) # plot new tree text(z.survey2) # add text to tree # can also interactively select the node using the mouse in the # graphics window