Call R in java and save the running results of R to a txt file

方法一:
c.eval(“y<-eperson(economic);y”);
c.eval(“capture.output(y, file = \”mile.txt\”)”);
方法二:
c.eval(“y<-eperson(economic);y”);
c.eval(“sink(\”a.txt\”)”);
c.eval(“print(y)”);
c.eval(“sink()”);

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325523275&siteId=291194637