Quantcast
Channel: R.NET
Viewing all articles
Browse latest Browse all 1634

New Post: How to return result from Rscript after execute code in R.NET

$
0
0
Dear Team
I have execute a script and which run without error and produce output, now I want to run same script in C# using R.NET it also execute properly but how to get result return from script ?

Please help !
here I am giving my script and C# code

My script
head(study123)
study123$lcmax<-log(study123$Cmax)
output<-aov(formula=lcmax~Treat,data=study123)
summary(output)
My C# code
            REngine.SetEnvironmentVariables();
            REngine engine = REngine.GetInstance();
            engine.Initialize();
            GenericVector testList = engine.Evaluate("source('D:/Rscript.r')").AsList();
            engine.Dispose();
How to fetch result from above code.
Here I got result from R
 Df Sum Sq Mean Sq F value  Pr(>F)   
Treat          1    3.7   3.732   8.747 0.00316 **
Residuals   1198  511.1   0.427                   
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Please help.

Viewing all articles
Browse latest Browse all 1634

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>