13

Running

InstallR["RHomeLocation" -> "C:\\Program Files\\R\\R-3.0.1"]

results in a popup box titled "Version Mismatch" saying

Error: R.DLL version does not match (DLL:3.0.1, expecting: 2.14.0).

Does RLink only work with versions of R at or around v2.14?

Szabolcs
  • 234,956
  • 30
  • 623
  • 1,263
Philip Maymin
  • 1,163
  • 8
  • 12

1 Answers1

7

Update: This is now fixed in Mathematica 10.0.1.


This is an issue on Windows only. We are aware of this, and it is planned to get this fixed in the next release of Mathematica. If I get the fix earlier and it is easy enough to create a patch, I will post the workaround here. As far as I know, there is no such issue with R 3.x.x on Linux. Currently, RLink should work on all 2.x.x versions of R (on Windows and Linux, and also on some Mac machines).

Szabolcs
  • 234,956
  • 30
  • 623
  • 1,263
Leonid Shifrin
  • 114,335
  • 15
  • 329
  • 420
  • 3
    "Next release" as in 'winter of 2015'? – Sjoerd C. de Vries Jun 15 '13 at 21:57
  • @SjoerdC.deVries Sorry, can't comment on that. But I am sure that this will be more clear by October, and coming to the Tech.Conference is one way to get a better idea about the time frame for this. – Leonid Shifrin Jun 15 '13 at 22:51
  • ;-) I knew you couldn't (and wouldn't). Nevertheless, I seemed to read some kind of subliminal message between the lines that evoked excitement. – Sjoerd C. de Vries Jun 16 '13 at 08:13
  • @SjoerdC.deVries Well, let's hope that new versions of Mathematica will be a continuous source of excitement for all of us, and for a long time :) – Leonid Shifrin Jun 16 '13 at 12:58
  • Meant to say: thanks for the answer. – Philip Maymin Jun 18 '13 at 19:23
  • @PhilipMaymin Well, this is surely not the kind of answer I like to give. But that's what it is, at present. – Leonid Shifrin Jun 18 '13 at 20:16
  • I have just installed R Version 3.0.2 and then tried to Install that version using InstallR["RHomeLocation" -> "C:\\Program Files\\R"] only to get the following error message: InstallR::nopaclet: Could not find RLink runtime installed. Please use RLinkResourcesInstall to install it>>. Is that (still) the same issue? – gwr Dec 22 '13 at 16:33
  • This sounds strange. The issue with R3.x still remains, but it should show up in a different way (usually this is a dll incompatibility message). I am not at the Windows machine at the moment to test it, but judging from your description this is something else. It may be that the layout in R3.x has changed as well. I will look into this next time I am on a Windows machine, in the next few days. – Leonid Shifrin Dec 22 '13 at 19:18
  • Jetzt tried InstallR["RHomeLocation" -> "C:\\Program Files\\R\\R-3.5.1"] on a Win7 64bit machine. Got the error massage: `DLL version does not match (DLL:3.5.1, expecting: 3.3.0). Does this mean it only works with R 3.3.0? – RMMA Sep 20 '18 at 12:05
  • @RMMA What happens is that whenever a new R version appears that breaks DLL compatibility, we eventually add a new version of JRI library to the layout. Until this is done, the workaround is described here (should also apply to Windows). Basically, you need to go to the R shell, install rJava package via install.packages("rJava"), then find the location of the installed package, find the folder where jri.dll is located, and use that folder for the setting of "NativeLibLocation" option. Hopefully, that should solve it. – Leonid Shifrin Sep 20 '18 at 12:11
  • @LeonidShifrin Thanks for your support. I installed rJava and also set the "NativeLibLocation". The path should be correct, I used system.file("jri,package="rJava"). Nevertheless I got the error Failed to instal R, unable to load dynamic libraries . – RMMA Sep 20 '18 at 12:52
  • @RMMA "I used system.file("jri,package="rJava")" - but you need not the file path, but a directory where that file is - may be that is a problem? If not, let me know, then I will have to check. Not on Windows right now. Will try to check this as soon as I get a spare moment and get to a Windows machine. Can you please ping me again here, if you don't hear from me by the end of tomorrow? I have a lot on my plate these days, might forget. Thanks. – Leonid Shifrin Sep 20 '18 at 14:49