This project is read-only.

unable to load R package Matrix

Mar 17, 2012 at 12:36 AM

I had made great progress integrating R with my C# project using R.NET when one of the packages I use was "updated" and now requires the Matrix package.

REngine

.SetDllDirectory(@"C:\Program Files\R\R-2.14.2\bin\i386");

using

(REngine engine = REngine.CreateInstance("RDotNet" ))

{

engine.EagerEvaluate(

"library(Matrix)");

 returns the error:

RDOTNET.ParseException: Error in the application.

  at RDotNET.REngine.Parse(String statement, StringBuilder incompleteStatement)

  at RDotNET.REngine.<Evaluate>d__0.MoveNext();

  at System.Linq.Enumerable.LastOrDefault[TSource](IEnumerable` source)

  at RDOTNET.REngine.EagerEvaluate(String statement)

  

The IO stream from R writes:

Error in DL(x, as.logical(local), as.logical(now),...):

unable to load shared object 'C:/Program Files/R/R-2.14.2/library/Matrix/libs/i386/Matrix.dll':

LoadLibrary failure: The specific module could not be found.

Error: package/namespace load failed for 'Matrix'

  

There is no problem using R.NET to load the 4 other packages I use and I can load Matrix without any problem using Rgui.

I am wondering whether the fact that this package is named Matrix (instead of matrix) is the source of the problem.

 

Thanks for a great dll.