I would like to use the R statistical package for some data crunching in an IronPython 2.7 application. I have found the R.NET assembly, which should make this possible. The problem is that IronPython refuses to load the R.NET assembly.
The code:
import clr
clr.AddReference("R.NET")
Produces:
System.IO.IOException: could not add reference to assembly R.NET
The assembly is located in a file called R.NET.dll
, which is stored in the same folder from which I am invoking ipy.exe
. I have checked that the folder is on sys.path
. I have tried variations like clr.AddReference("R.NET.dll")
and clr.AddReferenceToFile("R.NET.dll")
. None are successful.
Could the problem be that there is a dot (.
) in the assembly name? How would I work around that?
FWIW I am using Windows 7, R 2.13.0, IronPython 2.7, v4.0 of the .NET framework, and R.NET 1.4. I can successfully add a reference to R.NET from the Visual C# Express IDE (under .NET 4.0), and reproduce the examples from the R.NET homepage.
Thanks in advance!