Escribí un script en JMP que utiliza R para ayudar a un cliente a obtener información específica de su conjunto de datos. Nunca habían instalado R antes, así que los ayudé a instalarlo (como lo he hecho docenas de veces). Mi script arroja un error si JMP no puede encontrar R en la computadora (utiliza una declaración Throw(rconn = R Connect();,...)). JMP se estaba ejecutando cuando se instaló R, ejecuté el script y no pudo encontrar R. Salí de JMP, lo reinicié: mismo error. Reinicié la computadora, ejecuté el script: mismo error. Desinstalé R, salí de JMP, instalé R, inicié JMP: mismo error. Entonces, lo que me pregunto es, ¿puedo ayudar a JMP a encontrar R especificando el destino? Los archivos de soporte de JMP dicen:
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.
¿Puedo especificar la variable de entorno R_HOME o pasar el valor InstallPath?
Resulta que la solución fue que el usuario no tenía privilegios administrativos en el equipo (parecía que sí porque podía instalar R). Una vez que desinstalamos R, solicitamos derechos administrativos y reinstalamos R todo funcionó bien.
Notaré que una investigación más profunda ha revelado que la clave de registro está en HKEY_LOCAL_USER\.... en lugar de HKEY_LOCAL_MACHINE\...
No sé por qué para esta persona la tecla R está ahí y no para mí y todos los demás, pero mi pregunta sigue en pie: ¿puedo simplemente indicarle a JMP que busque una clave de registro diferente?