Re: [R] randomForest2Rules

2012-02-27 Thread saskay
Hi, The work around this is to use printRandomForests function in Rattle package. It outputs the forest in the form of rules. For ex: #Load libraries library(rattle) library(randomForest) #Load sample data data(iris) #Build a forest iris.rf <- randomForest(Species ~ ., data=iris, importance=TRUE

[R] randomForest2Rules

2011-09-18 Thread saskay
Hi, I'm trying to extract the rules from every tree in the random forest model that I've created. I've used randomForest2Rules function from "rattle" package however I get an error "Error in if (var.class == "character" | var.class == "factor") { : argument is of length zero" Sample code: libr