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

New Post: can't plot in a file

$
0
0
Hello,
I need to plot a graph from R to file using c# on x86 machine (Visual Studio 2010). I tried to follow example from http://rdotnet.codeplex.com/discussions/353150 but file wasn't created.
Here is my code:
        var envPath = System.Environment.GetEnvironmentVariable("PATH");
        var rBinPath = @"C:\Temp\test\R-lib";
        System.Environment.SetEnvironmentVariable("PATH", envPath + Path.PathSeparator + rBinPath);
        REngine.SetDllDirectory(@"C:\Temp\test\R-lib");            

        REngine engine = REngine.CreateInstance("RDotNet");                
        engine.Evaluate("bmp(file='C:\\Temp\\test\\img\\blah.bmp'); plot.ts(rnorm(100));");
        engine.Dispose();
But everything is fine when I execute the same command in R console
Could you please help me to find where is my error?

Viewing all articles
Browse latest Browse all 1634

Trending Articles



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