nodes
. The user may also use the
mouse and interactively select nodes on an active graphics device.
select.tree(tree, nodes, drop = T)
tree
.
This is assumed to be the result of some function that produces
an object with the same named
components as that returned by the
tree
function.
TRUE
, and only one subtree was specified or selected, returns a
tree
object, not a list.
nodes
.
For noninteractive use,
select.tree(obj, nodes)
is longhand for the
left-square-bracket method for trees
obj[nodes]
.
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 selects the subtree
rooted at that node.
This process may be repeated any number of times.
Warnings result from selecting the root or leaf nodes.
Clicking the exit button will stop the selection process
and return the resulting stand of
tree
objects.
See the documentation for the specific
graphics device for details on graphical input techniques.
Allows the user to select subtrees rooted at
nodes
of a tree object,
either by specifying the indices in the
nodes
argument, or by
using the mouse to click on the desired nodes within the graphics
display.
z.auto <- tree(Mileage ~ Weight, car.test.frame) z.auto[3] # subtree of z.auto rooted at node 3