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

Created Unassigned: REngine.GetInstance fails [177]

$
0
0
Hi, I'm new to R but really would love to use it in my C# programs via RDotNet. I've added R.net via Manage NuGet Packages in VS2013 (RDotNet runtime Version v4.0.30319).

Within Windows 7 I'm running R-3.2.2 and both 32bit and 64bit reside within my C:\Program Files\R\R-3.2.2\bin folder.

Here's the beginning of my code.

using System.IO;
using System.Linq;
using RDotNet;
using RDotNet.NativeLibrary;

namespace RNetTest
{
class Program
{
static void Main(string[] args)
{
// Set the R_HOME environment variable in which R.dll is located.
Environment.SetEnvironmentVariable("R_HOME", @"C:\Program Files\R\R-3.2.2\bin\i386");

REngine engine = REngine.GetInstance("RDotNet");

It fails on the GetInstance with the error:

An unhandled exception of type 'System.ArgumentException' occurred in DynamicInterop.dll

Additional information: Could not retrieve a pointer for the symbol 'R_CStackLimit' in file 'RDotNet'

If I run REngine.GetInstance(); like is suggested I get the following error:

An unhandled exception of type 'System.Exception' occurred in DynamicInterop.dll

Additional information: This 32-bit process failed to load the library R.dll. Native error message is 'The system cannot find the file specified'

I've been wrestling with this for many hours now and finally asking for some help on what a solution might be. It should be noted the error is the same for 32bit or 64bit R.dll versions.



Viewing all articles
Browse latest Browse all 1634

Trending Articles