rpart
data.tree
Convert an rpart object to a data.tree structure
# S3 method for rpart as.Node(x, digits = getOption("digits") - 3, use.n = FALSE, ...)
the rpart object to be converted
the number of digits to be used for numeric values in labels
logical. Add cases to labels, see text.rpart for further information
text.rpart
any other argument to be passed to generic sub implementations
a data.tree object. The tree contains a field rpart.id which references back to the original node id in the row names of the rpart object.
rpart.id
Other as.Node: as.Node.data.frame, as.Node.dendrogram, as.Node.list, as.Node.phylo, as.Node
as.Node.data.frame
as.Node.dendrogram
as.Node.list
as.Node.phylo
as.Node
# NOT RUN { if (require(rpart)) { fit <- rpart(Kyphosis ~ Age + Number + Start, data = kyphosis) as.Node(fit) } # }
Run the code above in your browser using DataLab