Print an rpart model as a set of rules.
Print an rpart model as a set of rules.
rpart.rules(x = stop("no 'x' argument"),
style = "wide", cover = FALSE, nn = FALSE,
roundint = TRUE, clip.facs = FALSE,
varorder = NULL, ...)
## S3 method for class 'rpart.rules'
print(x = stop("no 'x' argument"), style = attr(x, "style"), ...)x |
An |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
style |
One of: |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
cover |
Default |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
nn |
Default |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
roundint |
If |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
clip.facs |
Default |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
varorder |
By default, the variables in the rules are ordered left to right on
importance, where the “importance” of a variable here is the number of rules
it appears in. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
... |
The following can be passed as dot arguments.
See
|
A data.frame of class c("rpart.rules", "data.frame")
with some attached attributes which are passed on to print.rpart.rules.
Note that print.rpart.rules temporarily increases options(width).
data(ptitanic) model <- rpart(survived ~ ., data = ptitanic, cp = .02) rpart.plot(model) rpart.rules(model)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.