Select Subtrees of a Tree Object

DESCRIPTION:
Returns a list of subtrees rooted at nodes. The user may also use the mouse and interactively select nodes on an active graphics device.

USAGE:
select.tree(tree, nodes, drop = T)

REQUIRED ARGUMENTS:
tree:
fitted model object of class 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.

OPTIONAL ARGUMENTS:
nodes:
an integer vector containing indices (node numbers) of all subtrees to be selected. If missing, user selects nodes as described below.
drop:
if TRUE, and only one subtree was specified or selected, returns a tree object, not a list.

VALUE:
returns a list (sometimes called a stand) of subtrees rooted at nodes. For noninteractive use, select.tree(obj, nodes) is longhand for the left-square-bracket method for trees obj[nodes].

GRAPHICAL INTERACTION:
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.


DETAILS:
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.

SEE ALSO:
Subscript.tree , tree .

EXAMPLES:
z.auto <- tree(Mileage ~ Weight, car.test.frame)
z.auto[3]     # subtree of z.auto rooted at node 3