# please make sure Klimt.jar is in the working directory! # if it's not, replace Klimt.jar by the full path Klimt <- function(tr,dat) { write.table(dat,"FromR.tree",sep="\t",quote=FALSE,row.names=FALSE) sink("FromR.tree",TRUE) print(tr) print(formula(terms(tr))) sink() system("java -jar Klimt.jar FromR.tree") }