Subscribe Bookmark RSS Feed

Help JMP find R installation

mewing

Community Trekker

Joined:

Jun 23, 2011

I wrote a script in JMP that utilizes R to help a client get some specific information out of their dataset.  They had never installed R before so I helped them get it installed (much as I have dozens of times).  My script throws an error if JMP cannot find R on the computer (it utilizes a Throw(rconn = R Connect();,...) statement).  JMP was running when R was installed, I ran the script and it couldn't find R.  I quit JMP, relaunched it - same error.  I rebooted the computer, ran the script - same error.  I uninstalled R, quit JMP, installed R, launched JMP - same error.  So, what I'm wondering is, can I help JMP find R by specifying the destination?  JMP Support files say:


How JMP Finds R


JMP delays loading R until a JSL-based script requires access to it. When JMP needs to load R, it follows the standard steps for finding R on a Windows computer:


1.Look up the environment variable R_HOME.


If the variable exists, load R from the specified directory.


2.If the environment variable R_HOME does not exist, look up the InstallPath value in the Windows registry under the following key:


HKEY_LOCAL_MACHINE\SOFTWARE\R-core\R


For 32-bit JMP running on a 64-bit machine, the InstallPath value is under the following key:


HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432NODE\R-core\R


If the InstallPath value exists, load R from the specified directory.


3.If the InstallPath value does not exist, an error message states that R could not be found.


Can I specify the environment variable R_HOME or pass along the InstallPath value?

1 ACCEPTED SOLUTION

Accepted Solutions
Solution

It turns out the solution was that the user did not have administrative privileges on the computer (it seemed they did because they could install R).  Once we uninstalled R, requested administrative rights and reinstalled R everything worked fine.

2 REPLIES
mewing

Community Trekker

Joined:

Jun 23, 2011

I will note that further investigation has revealed that the registry key is in HKEY_LOCAL_USER\.... instead of HKEY_LOCAL_MACHINE\...

I don't know why for this person the R key is there as opposed to where it is for me and everyone else, but my question stands, can I simply instruct JMP to look for a different registry key?

Solution

It turns out the solution was that the user did not have administrative privileges on the computer (it seemed they did because they could install R).  Once we uninstalled R, requested administrative rights and reinstalled R everything worked fine.