The randomForest object has all the information about each tree in the object. Each tree is not particularly difficult, although this can be misleading.
iris.rf <- randomForest(Species ~ ., data=iris, importance=TRUE, proximity=TRUE) > names(iris.rf$forest) [1] "ndbigtree" "nodestatus" "bestvar" "treemap" "nodepred" [6] "xbestsplit" "pid" "cutoff" "ncat" "maxcat" [11] "nrnodes" "ntree" "nclass" "xlevels"
To figure out how to use the forest outside R, you will need to look at the source code. Download the source package randomForest, extract tar.gz and look in the src directory. In rf.c you will see the classForest function (and for regression, look at regforest in regrf.c). Look at the function R. predandom.randomForest to see what it is called. You may need to use getAnywhere ("predict.randomForest") to see it within R.
It will take quite a while to extract information from R and predict in another package, so you will need to think carefully before you do it. Converting the software that you intend to use may be simpler.
rjad
source share