Thanks you for the succint code sample.
I cannot reproduce the problem with the current development codebase, using R 2.14.2 (Platform: x86_64-pc-mingw32/x64 (64-bit)
). I did not revert to the latest release as I suspect the issue will be hard to figure out even if I reproduce it. You may want to consider checking out the latest code if you can build it.
The following code worked fine:
var rdllloc = args.Length > 0 ? args : @"c:\bin\R\R\bin\x64";
REngine.SetDllDirectory(rdllloc); // obsolete
var rhome = Environment.GetEnvironmentVariable("R_HOME");
if (string.IsNullOrEmpty(rhome)) Environment.SetEnvironmentVariable("R_HOME", @"c:\bin\R\R");
engine = REngine.CreateInstance("RDotNet");
engine = RDotNet.REngine.GetInstanceFromID("RDotNet");
engine.Evaluate("bmp(file='C:/Users/Public/Pictures/Sample Pictures/blah.bmp'); plot.ts(rnorm(100))");