Message Boards Message Boards

GROUPS:

Install R-3.5.1 using InstallR, Mathematica 11.3 in Win 10?

Posted 11 months ago
1405 Views
|
3 Replies
|
2 Total Likes
|

I previously had some raw data in the R language using the mediation package analysis and then wanted to use Mathematica for subsequent analysis. This process is not very smooth. Please help.

Needs["RLink`"]
RLinkResourcesInstall[]
InstallR["RHomeLocation" -> "C:\\Program Files\\R\\R-3.5.1"]

An error message appears: InstallR::fail: Failed to install R. The following error was encountered: Unable to load dynamic libraries

3 Replies
Posted 5 months ago

I have just recently installed RLink on Windows, with Mathematica 11.3. I was unable to get R v3.5.1 to work, and the same "unable to load dynamic libraries" message kept popping up, however it seems to be running well with R v 3.4.1.

It would be helpful if Wolfram could put a prominent note in the documentation about which version(s) of R they are supporting with RLink.

If you have rJava installed already, try this, for example,

Needs["RLink`"]

JLink`UninstallJava[]

InstallR["RHomeLocation" -> 
  "C:\\Data-Work\\Programs\\R-3.5.1\\App\\R-Portable",
 "NativeLibLocation" -> 
  "C:\\Data-Work\\Programs\\R-3.5.1\\App\\R-Portable\\library\\rJava\\\
jri\\x64"]

REvaluate["R.Version()"]

I'm using Window 10 (1803) and Mathematica 11.3. "RHomeLocation" - path to your R and "NativeLibLocation" - path to Java R Interface

see this for more details

Posted 5 months ago

Thanks for the tip, I'll give it a try when I get some time.

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract