Learn R Programming

rattle (version 2.6.25)

asRules.rpart: List the rules corresponding to the rpart decision tree

Description

Display a list of rules for an rpart decision tree.

Usage

## S3 method for class 'rpart':
asRules(model, compact=FALSE, \dots)

Arguments

model
an rpart model.
compact
whether to list cateogricals compactly.
...
further arguments passed to or from other methods.

Details

Traverse a decision tree to generate the equivalent set of rules, one rule for each path from the root node to a leaf node.

References

Package home page: http://rattle.togaware.com

Examples

Run this code
asRules.rpart(my.rpart)

Run the code above in your browser using DataLab