14.03.2014 Views

Scripting Guide - SAS

Scripting Guide - SAS

Scripting Guide - SAS

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 14 Extending JMP 487<br />

Working with R<br />

Installing R<br />

• Display graphics produced by R.<br />

Textual output and error messages from R appear in the log window.<br />

R must be installed on the same computer as JMP. JMP is not distributed with a copy of R. You can<br />

download R from the Comprehensive R Archive Network Web site:<br />

http://cran.r-project.org<br />

Because JMP is supported as both a 32-bit and a 64-bit Windows application, you must install the<br />

corresponding 32-bit or 64-bit version of R. For the supported version of R, see the system requirements on<br />

the JMP Web site: http://www.jmp.com/support/system_requirements_jmp.shtml<br />

How JMP Finds R<br />

JMP delays loading R until a JSL-based script requires access to it. When JMP needs to load R, it follows<br />

the standard steps for finding R on a Windows computer:<br />

1. Look up the environment variable R_HOME.<br />

If the variable exists, load R from the specified directory.<br />

2. If the environment variable R_HOME does not exist, look up the InstallPath value in the Windows<br />

registry under the following key:<br />

HKEY_LOCAL_MACHINE\SOFTWARE\R-core\R<br />

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

HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432NODE\R-core\R<br />

If the InstallPath value exists, load R from the specified directory.<br />

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

Testing Your Setup<br />

To test that your computer is able to run JSL-based scripts that use R, run the following JSL script:<br />

R Init( );<br />

R Submit("<br />

x

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!