# Any hope to support external R distribution on Mac?

Posted 6 months ago
755 Views
|
5 Replies
|
3 Total Likes
|
 Even with the newly released version 11.3, Mathematica on a Mac (or, apparently, under Linux) still does not allow using an external R distribution.Is there some strong technical reason why support for an external R distribution is currently provided only for Windows?
5 Replies
Sort By:
Posted 6 months ago
 We have been lucky by using the description by Szabolcs Horvat:http://szhorvat.net/pelican/setting-up-rlink-for-mathematica.htmlIt comes "at-your-own-risk" but seems to work just fine. Please find a notebook that we used in a lecture attached. It uses the ggplot2 package and a glm package. The myData.csv file is from this website: https://stats.idre.ucla.edu/r/dae/logit-regression/Best wishes,Marco Attachments:
Posted 6 months ago
 Thanks for the pointer to Horvat's material.It's unclear if his method requires leaving SIP disabled. If so, then this rather awkward workaround would be unsatisfactory for me on security grounds. If not, then it's worth a try.But still no excuse for WRI not having added support on platforms other than Windows.
Posted 6 months ago
 When I posted my last message, Marco's was not yet visible for some reason. As soon as my post went through, two more messages appeared immediately. The forum engine behind Wolfram Community really needs a bugfix update too ...To answer Murray's question:You have a choice: You can either disable SIP (which I did not even try myself, for the reasons you mention, thus I haven't been able to verify that it works) Or you can patch libjri.jnilib. This is what I do. It's a bit more involved though.
Posted 6 months ago
 @Marco: Just a note that if you patch libjri.jnilib, it is no longer necessary to set DYLD_LIBRARY _PATH. The whole reason why we need to patch this file is that with SIP enabled, DYLD_LIBRARY _PATH will no longer influence which shared libraries get loaded.
Posted 6 months ago
 I would like to see this added too. Supporting an external R into which we can install arbitrary packages is an absolute necessity. Without access to R packages, there's little point in calling R from Mathematica at all.I wrote a blog post about how to use external R installations on Mac (and other platforms), but the procedure is a bit messy: You can use it as a workaround until this gets fixed.
Community posts can be styled and formatted using the Markdown syntax.