Hi,
I have a JSL script that's calling an R routine. 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. The syntax is:
Set Environment Variable("R_HOME", "C:\whatever the path is on my laptop\R-3.2.2");
Everything works; no problem. However, 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. 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.
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? 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?
Many thanks