I am trying to get Mathematica and R to look at the same workspace, but have failed thus far. The task is to produce variables that will be operated upon by either program while the current state of these also can be simultaneously read by both. The R documentation allows for specification of the workspace but I am only guessing at the correct Mathematica notation. Here is the code:
(*testing connectivity*)
Needs["RLink`"];
SetEnvironment["LD_LIBRARY_PATH" -> "~/bin/r/.RData"];
InstallR["RHomeLocation" -> "~/bin/r/.RData", "RVersion" -> 3];
I have also tried:
Needs["RLink`"];
SetEnvironment["LD_LIBRARY_PATH" -> "~/bin/r/.RData"];
InstallR["RHomeLocation" -> "/usr/lib/R", "RVersion" -> 3];
and various similar combinations.
Note that the first version points explicitly to the file used by R. I have tried opening the two programs in different order (Mathematica first... R first) - nothing works. While can see workspaces in both programs, the workspaces are different, containing different variables.
RHomeLocationwith Linux Mathematica distribution. – m0nhawk Feb 22 '16 at 19:49