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

New Post: Call RDotNet and R on 64-bit Mac OS X from 32-bit W7 over network

$
0
0
I am following the console example (https://rdotnet.codeplex.com/), which works fine on 32-bit Windows 7. However, the work that I have for R to do needs to load vectors bigger than 2 MB, which I can't do in 32-bit R. The R application (v.3.0.3) handles this just fine on Mac OS X 10.7.5 (64-bit). So I am attempting to call RDotNet and R from my VS console application on 32-bit W7 over a network connection to the Mac. Here are the code changes that I made:
REngine.SetEnvironmentVariables("\\\\MACBOOKPRO-443C\\Macintosh HD\\Library\\Frameworks\\R.framework\\Versions\\3.0\\Resources\\bin", "\\\\MACBOOKPRO-443C\\Macintosh HD\\Library\\Frameworks\\R.framework\\Versions\\3.0\\Resources\\bin");

Console.WriteLine(RDotNet.NativeLibrary.NativeUtility.FindRHome());
        
Console.WriteLine(RDotNet.NativeLibrary.NativeUtility.GetPlatform());

REngine engine = REngine.GetInstance("R");
``` I have also tried slightly changing the paths from /bin to /lib and calling Engine engine = REngine.GetInstance("libR.dylib"); . The console output is essentially the same:
c:\Program Files\R\R-3.0.3
Win32NT
Unhandled Exception:  System.Exception  This 32 bit process failed to load the library \MACBOOKPRO-443C\Macintosh HD\Library\\Frameworks\R.framework\Versions\3.0\Resources\bin\R (or libR.dylib)  Native error message is 'The system cannot find the file specified'
at RDotNet.NativeLibrary.UnmanagedDll.ReportLoadLibrary<String dllName>
at RDotNet.NativeLibrary.UnmanagedDll.ctor<String dllName>
at RDotNet.REngine.ctor<String id, String dllName>
at RDotNet.REngine.CreateInstance<String id, String dllName>
at RDotNet.REngine.GetInstance<String id, Boolean initialize, StartupParameter parameter, ICharacterDevice device>
at RConsoleAppTest.Program.Main<String[] args> in C:\Users\Me\Documnets\Visual Studio 2012\Projects\RConsoleAppTest\Program.cs: line 38
Line 38 is the REngine.GetInstance(). I had loaded the assemblies into my VS project through the network path, and they are in the same directories as R....
I see the problem that FindRHome and GetPlatform return W7 settings, from the registry, since that path no longer exists. Can anyone help to get FindRHome and GetPlatform to return the values from Mac, where I thought that I was actually running RDotNet and RDotNet.NativeLibrary? I think if I can resolve this, then there wouldn't be the 32-bit vs. 64-bit conflict that I'm getting, but I'm not sure. BTW, I built Mono in 64-bit mode on Mac OS X. Also, I'm using RDotNet 1.5.12.

Viewing all articles
Browse latest Browse all 1634

Trending Articles



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