View source: R/node_conversion_rpart.R
as.Node.rpart | R Documentation |
rpart
object to a data.tree
structureConvert an rpart
object to a data.tree
structure
## S3 method for class 'rpart'
as.Node(x, digits = getOption("digits") - 3, use.n = FALSE, ...)
x |
the |
digits |
the number of digits to be used for numeric values in labels |
use.n |
logical. Add cases to labels, see |
... |
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.
Other as.Node:
as.Node.data.frame()
,
as.Node.dendrogram()
,
as.Node.list()
,
as.Node.phylo()
,
as.Node()
if (require(rpart)) {
fit <- rpart(Kyphosis ~ Age + Number + Start, data = kyphosis)
as.Node(fit)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.