<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Setting the R_HOME environment variable for different users in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Setting-the-R-HOME-environment-variable-for-different-users/m-p/17806#M16231</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Jim - it looks like this particular problem is simply going to vanish when the time comes to deploy it, which is great news.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks,&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 04 Apr 2016 13:04:09 GMT</pubDate>
    <dc:creator>DMR</dc:creator>
    <dc:date>2016-04-04T13:04:09Z</dc:date>
    <item>
      <title>Setting the R_HOME environment variable for different users</title>
      <link>https://community.jmp.com/t5/Discussions/Setting-the-R-HOME-environment-variable-for-different-users/m-p/17804#M16229</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a JSL script that's calling an R routine.&amp;nbsp; To run it, I'm setting an environment variable called R_HOME to the location into which R (currently version 3.2.2) has been installed.&amp;nbsp; The syntax is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set Environment Variable("R_HOME", "C:\whatever the path is on my laptop\R-3.2.2");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Everything works; no problem.&amp;nbsp; &lt;EM&gt;However,&lt;/EM&gt; I need to deploy this script to a number of other users, each of whom could well have (a) put the R package somewhere else, and (b) installed it under a different name - most obviously if a new version of R is released, and they install it with the default name of the new version number.&amp;nbsp; It seems to me this presents me with a problem, because I don't know what to set the R_HOME environment variable to for anyone else but me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any way I can search for the most recent version of R - whatever it is - on the other users' machines, and then set the environment variable accordingly?&amp;nbsp; Or will I have to insist that every user gives their R directory exactly the same name, and to put it in a specific location which I specify?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 03 Apr 2016 21:16:02 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Setting-the-R-HOME-environment-variable-for-different-users/m-p/17804#M16229</guid>
      <dc:creator>DMR</dc:creator>
      <dc:date>2016-04-03T21:16:02Z</dc:date>
    </item>
    <item>
      <title>Re: Setting the R_HOME environment variable for different users</title>
      <link>https://community.jmp.com/t5/Discussions/Setting-the-R-HOME-environment-variable-for-different-users/m-p/17805#M16230</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;JMP should automatically find the R_HOME environment variable.&amp;nbsp; The following is taken from the JMP Scripting Guide&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How JMP Finds R&lt;/P&gt;&lt;P&gt; 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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If R is installed correctly, it will set the R_HOME environment variable, so your colleagues should not have an issue running your script, as long as you don't override the R_HOME environment variable.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Apr 2016 03:44:05 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Setting-the-R-HOME-environment-variable-for-different-users/m-p/17805#M16230</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2016-04-04T03:44:05Z</dc:date>
    </item>
    <item>
      <title>Re: Setting the R_HOME environment variable for different users</title>
      <link>https://community.jmp.com/t5/Discussions/Setting-the-R-HOME-environment-variable-for-different-users/m-p/17806#M16231</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Jim - it looks like this particular problem is simply going to vanish when the time comes to deploy it, which is great news.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks,&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Apr 2016 13:04:09 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Setting-the-R-HOME-environment-variable-for-different-users/m-p/17806#M16231</guid>
      <dc:creator>DMR</dc:creator>
      <dc:date>2016-04-04T13:04:09Z</dc:date>
    </item>
  </channel>
</rss>

