Applies To
Revolution Analytics

There is no direct function for printing the rules in an rxDTree object but rules can be extracted by first converting the rxDTree object to an equivalent rpart object and calling asRules() from the rattle package.Example:

library(rattle)set.seed(1234) # classification iris.sub <- c(sample(1:50, 25), sample(51:100, 25), sample(101:150, 25)) iris.dtree <- rxDTree(Species ~ Sepal.Length + Sepal.Width + Petal.Length + Petal.Width,  data = iris[iris.sub, ]) iris.dtree asRules(as.rpart(iris.dtree))

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.