Madam,
I've read your answer :
///////////////////////////////////////
Here are other alternatives that are easy to implement and that you
should consider depending on what you want to do:
1- one is to use R in batch mode ie you create a file in your java code
with all the R commands and send it to R (via Process
pc=Runtime.getRuntime().exec(Rcall); )and then R creates an outputfile
with all the results.
The matter with this is that there is no interactivity, variables are
not kept, you have to parse the outputfile, ... (see the above article
(see ยง FFinterface))
2- another one is to use the R server developed by Simon Urbanek:
http://stats.math.uni-augsburg.de/Rserve/
A java frontend is provided with the server, which allows to communicate
easily with R and which sends back results in a java object. So for each
connection to the server you have a R environment where all the variable
generated are kept until you close the connection and from you java code
it is as simple as this example: REXP mean =
c.eval("mean"+i+"<-apply("+data+"[,data.cl=="+(i-1)+"],1,mean.na)");
This is what I'am using in my application and I am quite satisfied with
it.
//////////////////////////////
For the first solution, I have not understood how I get the results from R???
For the second solution, I didn't understant the instruction, i'm
beginner in R and Java???
I ve understood that Rserve is a server that I should install server R, R and
the JDK for the jav???
Thank you in advance,
XENA
---------------------------------
[[alternative HTML version deleted]]