I have a conditional inference tree model (ctree
) saved in an R .rda
file and am trying to convert it into a Weka .arff
file:
library("foreign")
load("my_ctree.rda")
write.arff(my_ctree, file = "outputFile.arff")
but I get error:
Error in as.data.frame.default(x[[i]], optional = TRUE) : cannot coerce class ‘structure("BinaryTree", package = "party")’ to a data.frame
How can I achieve this?