From J Wiki
< Interfaces‎ | R
Jump to navigation Jump to search
Rserver | Methods | Formats | Examples | Quirks

This is an interface to R for J64 on Windows/Mac/Linux.

J loads a shared library to call R installed on the same machine.

Either R should be on the path, or the R_HOME environment variable should be set when calling J, as in:

SET R_HOME="c:\Program Files\R\R-3.3.2"   windows
export R_HOME=/usr/lib/R                  linux

Note - in recent versions of J and Windows, it may be necessary to set the full path to R instead of, or as well as, R_HOME. Experiment to see which works. For example, replace the R_HOME line with:

set PATH=%PATH%;C:\Program Files\R\R-3.3.2\bin\x64

The shared libraries are distributed in ~addons/stats/r/lib with source in the Public repository at stats/r/rserver/lib.