Apologies in advance if this is obvious, but I can't seem to find an answer to it online. I was wondering if it is possible to write to a csv file in R from Java. For example, if I was to create normal data and write it to a csv file, I thought something like this might work:
Rengine re=new Rengine(args, false, new TextConsole());
re.eval("write.csv(rnorm(100,50,10), file='C:\\MyDocuments\\test.csv')")
Also, on a lesser note, if I create an object in R from java, is there any way to access it later? A simple example:
re.eval(x<-20)
re.eval(x<-x+40)