This project is read-only.

Test Failed

Feb 18, 2013 at 10:34 PM
This looks like a great project! And thanks for answering my question over at R.NET. I just ran through the install and ran in to a problem so I thought I would let you know (not sure if this is something that is a known issue). When I ran:


I got the error:

"Error in clrCallStaticMethod("ClrFacade.ObjectFactory", "SetRDotNet", :
Static method call failed with message: Unknown error 0x80131604"

It appears to be thrown by the method clrInit() and if it helps I gather the program is trying to use the MS and not the Mono CLR runtime.

Any ideas?

Feb 23, 2013 at 3:00 AM

Not sure what caused this; unfortunately the translation of HRESULT codes from the MS CLR hosting often results in such unhelpful messages.

This is likely that the R.NET engine fails to be initialized internally, because one of the dependency assembly is not found.

I have now overcome the need to have .NET binaries (ClrFacade.dll and others) along Rgui.exe, which should further prevent this sort of situations. I will release an updated package in the coming days. Mono and MS.NET are now at parity on features on Windows. There is one bug on Linux, possibly in mono itself, that prevents a release for now.

Feb 24, 2013 at 6:03 PM
Hey J-M,

Thanks for commenting. I tried to track down the error but abandoned that when I realized the method throwing the error has been removed from the current version of the code. I posted the cause on the issue tracker, but suspect this doesn't affect later versions as this method is removed.

Good luck on the mono/linux bug! Am definitely wishing this project success.

Feb 26, 2013 at 3:14 AM
Hi Nigel,

I have just released the Beta 1 package. It does not require .NET binaries to be next to R.exe or Rgui.exe anymore, and hopefully resolves your issue.

I suspect that the call to load one of the R.NET assemblies related to that (maybe R.NET.NativeLibraries.dll missing?).
Thanks for your interest, and let me know if you have issues or suggestions.

Feb 26, 2013 at 6:19 PM
Edited Feb 26, 2013 at 6:21 PM
Hi J-M,

So I just downloaded the Beta and it didn't work again. The issue is that the program assumes that the code is on a particular lib path, but because on windows 7 and other operating systems the R libraries go under the Documents folder, this doesn't work. I just submitted a pull request that contains a fix for the problem.

In general, it seems like you are having a lot of problems putting the appropriate libraries on the path, and also are rewriting several functions (getNativeLibsPathRlibs, getNativeLibsPathRhome, etc.) that are re-inventing the wheel. The challenge of finding library files in general is handled more robustly by the standard R system.file command.

Do you happen to have a copy of John Chambers Software for Data Analysis/Programming with R book? The documentation on R is pretty sparse at times but this book is really good at explaining R internals and lots of programming stuff for it. In particular, the section "Interfaces to Other Software" on pages 108-110 seems germane to what you are doing. It describes how if the managed .dll files are placed in the source directory for the package in say inst/clr then they would be directory copied to the intalled files top directory, you can then discover where all the files are located with a command such as:
system.file("clr", c('ClrFacade.dll',"RDotNet.dll","rClr.dll"),package='rClr')

My pull only implements a quick change to use the system.file command, but it might be wise to simply restructure the code base so that you make use of the inst directory structure R expects, and then remove the various getNativeLibsPath functions so that only system.file is used, which will likely save some headaches.

Warm wishes,