Question

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 ?

No correct solution

OTHER TIPS

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top