The following didn't work for me. Simply crashes with no exception caught.
REngine engine = null;
try
{
REngine.SetEnvironmentVariables(@"C:\Program Files\R\R-3.2.3\bin\x64", Directory.GetCurrentDirectory());
engine = REngine.GetInstance();
}
catch (Exception ex)
{
Console.WriteLine("Error: " + ex.Message);
Console.ReadKey();
return;
}
I installed R for Windows version 3.2.3 without the registry option.
I am using R.NET.Community version 1.6.5 targeting .NET framework 4.0.
I tried the path @"C:\Program Files\R\R-3.2.3\bin\i386" as well and I get
%1 is not a valid Win32 application Error: This 64-bit process failed to load the library R.dll. Native error message is 'The system cannot find the file specified'
Thank you for any advice.