I would like to export a Caret random forest model using the pmml library so I can use it for predictions in Java. Here is a reproduction of the error I am getting.
You can use the r2pmml package to do the job:
library("caret") library("r2pmml") data(iris) train.rf = train(Species ~ ., data = iris, method = "rf") print(train.rf) r2pmml(train.rf, "/tmp/train-rf.pmml")