path.rpart
.
path.itree(tree, nodes, pretty=0, print.it=TRUE)
itree
. This is assumed to be the
result of some function that produces an object with the same named
components as that returned by the itree
function.
NULL
, the default, signifies using elements of letters to represent
the different factor levels.
nodes
argument is supplied.
itree
object 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 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
paths.itree
object and
a list of nodes as optional arguments. Omitting a list of
nodes will cause the function to wait for the user to
select nodes from the dendrogram. It will return a list,
with one component for each node specified or selected.
The component contains the sequence of splits leading to
that node. In the graphical interaction, the individual
paths are printed out as nodes are selected.
path.tree
in S.
itree
#rpart example:
fit <- itree(Kyphosis ~ Age + Number + Start, data=kyphosis)
summary(fit)
path.itree(fit, node=c(11, 22))
Run the code above in your browser using DataLab