identify.tree(x, nodes, print.it=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
,
the observations will be printed out as nodes
are interactively selected.
This argument is ignored if the
nodes
argument
is supplied.
A dendrogram of
tree
is expected to
be visible on the graphics device,
for which a graphics input device (eg a mouse) is required.
Clicking (the selection button) on a node selects that node.
This process may be repeated any number of times.
Clicking the exit button will stop the selection process
and return the list of observation names.
This function is a method for the generic function for class tree. It can be invoked by calling for an object x of the appropriate class, or directly by calling regardless of the class of the object.
z.auto <- tree(Mileage ~ Weight, car.test.frame) i2 <- identify(z.auto, 2) # assign observations in node 2 # fit linear model to this subset z2 <- lm(Mileage ~ Weight, car.test.frame, subset = i2)