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

View source: R/asRules.rpart.R

asRules.rpartR Documentation

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, classes=NULL, ...)

Arguments

model

an rpart model.

compact

whether to list cateogricals compactly (default FALSE).

classes

which target classes should be listed (default all).

...

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.

Author(s)

Graham.Williams@togaware.com

References

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

Examples

## Not run: asRules.rpart(my.rpart)

rattle documentation built on March 21, 2022, 5:06 p.m.