Background
Yes, there have been a lot of questions on RLink (quite a few on just how to get it working or installing packages). However none directly address loading RLink on MacOS. Older questions Installing R packages using RLink on Mac OS X appear to somehow have RLink working.
When some posts have users with MacOS dealing with difficulty due to RLink, Szabolcs' post on Setting up RLink for Mathematica has become the default response to these errors. (see here, here, etc)
Namely, it states (for MacOS):
Needs["RLink`"]
SetEnvironment["DYLD_LIBRARY_PATH" -> "/Library/Frameworks/R.framework/Resources/lib"];
InstallR["RHomeLocation" -> "/Library/Frameworks/R.framework/Resources", "RVersion" -> 3]
However, it is stated clearly in the documentation for InstallR:
"RHomeLocation" Automatic location of the root of an external R distribution (currently Windows only)
Running the SetEnvironment command does not seem to cause any errors.
Another previous question Does mathematica 9 on mac depend on these dynamic libraries? has an answer which states:
none of the direct dependencies lies under /usr/local
which, in the terminal, which R is under:/usr/local/bin/R. Honestly, I do not even know if that is relevant.
Question
Does anyone have a fool-proof solution for using RLink on MacOS?
libjri.jnilibdoes not exist... – SumNeuron Feb 17 '17 at 08:44FileNames["*.jnilib", FileNameJoin@{$InstallationDirectory, "SystemFiles", "Links", "RLink"}, Infinity]– Szabolcs Feb 17 '17 at 11:13.jnilibfile was nowhere to be found, so I did I clean install. Yes, it seems to work now. :) – SumNeuron Feb 22 '17 at 07:07