4

I'm working with R on my Java programs and I need to use some statistical tests, such as anova.

But I don't know how to save the R results in a file to manage them later in Java.

I try RCaller and rJava to join R and Java, but I think the problem is not the way to join R and Java.

Does anybody know what can I do?

Example:

I have this dataset in a csv file:

 growth,sugar
 75,C
 72,C
 73,C
 61,F
 67,F
 64,F
 62,S
 63,S

So I run these commands in R:

 your.data=read.csv("/Users/kakius82/Desktop/anovaDataset.csv")
 attach(your.data)
 your.aov=aov(growth~sugar)
 summary(your.aov)

And the results are this:

            Df Sum Sq Mean Sq F value Pr(>F)
sugar        2 187.71   93.85   20.26  0.004 **
Residuals    5  23.17    4.63                  
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

How can I save this results to manage them later ?

  • 2
    Welcome to SO. Please provide a [reproducible example](http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) as it makes answering your question a lot easier. – geotheory Jul 30 '13 at 08:56

1 Answers1

2

Look JRI and RServe. Here you have an eclipse plugin. To call RServe : Here

L. Quastana
  • 1,273
  • 1
  • 12
  • 34