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:
Could you please help me to find where is my error?
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?