1

I'm trying to execute some R scripts from an existing .net (C#) program and I get an error localy :

Error: le package 'stats' ne peut être chargé

This error in french means 'stats' package can't be loaded.

Few more information on the issue :

  • The project (and scripts) run well on our azure VM
  • Scripts run well when running from my local R installation, not when executing them from our project.
  • Some other libs were missing (forecast for instance) which I installed using install.packages("forecast").
  • Our project is running scripts on a local R installation through R.NET wrapper
  • Tryed R.NET 1.6.5 and R 3.2.1 (which are the same deployed on our prod vm) and R 3.2.2, no success
  • I did not modify anything in the source code
  • R_HOME seems OK, it points to R install directory

I found this question (Upgrading to R 2.15.2 can't load stats package) which does not seems to be the same issue

Any solution to the issue or any hint to understand and correct whan happen is welcome.

Thanks

Community
  • 1
  • 1
bouquetf
  • 435
  • 3
  • 13
  • 1
    This is likely an issue with determining the proper R_HOME. This has often been the case in particular with multiple R installations. I previously started a troubleshooting page at http://jmp75.github.io/rdotnet/ts_paths_on_windows/; could you run the test program and report the output? – j-m Sep 16 '15 at 21:48
  • Thanks for your answer. It's a good idea but the information seem correct : C:\testR\R-3.2.1 for the path and the process is not 64 bits. By the way, my computer is 64bits so it may be strange... Any idea ? – bouquetf Sep 17 '15 at 09:20
  • Info: caller provided rPath=null,rHome=null Info: R.NET looked for preset R_HOME env. var. Found null Info: Found Windows registry key HKEY_LOCAL_MACHINE\\SOFTWARE\\R-core\r\nInfo: Found Windows registry key HKEY_LOCAL_MACHINE\\SOFTWARE\\R-core\r\nInfo: Found sub-key InstallPath under HKEY_LOCAL_MACHINE\\SOFTWARE\\R-core\\R\r\nInfo: InstallPath value of key HKEY_LOCAL_MACHINE\\SOFTWARE\\R-core\\R: C:\\test-r\\R-3.2.1 Info: R.NET looked for platform-specific way (e.g. win registry). Found C:\\test-r\\R-3.2.1 Info: R.NET trying to find rPath based on rHome; Deduced C:\\test-r\\R-3.2.1\\bin\\i386 – bouquetf Sep 17 '15 at 09:30
  • C# projects have a setting where 32 bits runtime can be specified as prefered, so it is possible to see a 32 bit process be default. Should still work. I tried to replicate your setup. Incidentally, the relevant registry keys are under HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\R-core\R. Bit annoying that windows "hides" the Wow6432Node. I then got the same path report as you, but the R engine loads 'stats' fine. Seems I cannot reproduce your issue. – j-m Sep 18 '15 at 23:06
  • You probably checked that, but does everything looks installed properly under c:\test-r\R-3.2.1\library\stats, i.e. this looks like the expected package structure? If so, I am baffled as to why you have this issue, and we may need to work around it by other ways (e.g. not having parallel installations of R). I'll try to work on it this week-end. – j-m Sep 18 '15 at 23:12
  • I have only one install of R on my computer. I tryed with several versions in parallel or not, I tried declaring a R_HOME as environment variable too. Other information, I'm on windows 7. It seems an other colleague has the same issue, solved it but he don't remember how... I'm still on it, Tell me if you have more ideas. Thanks for your help – bouquetf Sep 21 '15 at 04:44

0 Answers0