EnvVars-JuliaConnectoR {JuliaConnectoR} | R Documentation |
Environment variables used by the JuliaConnectoR
Description
There are some environment variables which can be used to deviate from the
default behavior of the package.
To have an effect, these environment variables must be set before a Julia
connection is established, i.e., before the first call to Julia or before a
call to startJuliaServer
.
All the variables are optional.
Details
The environment variables that are used in the package are listed below:
- JULIA_BINDIR:
The directory where the
bin
directory of the Julia can be specified explicitly. This allows, e.g., to easily work with different Julia versions without having to modify the system PATH.- JULIACONNECTOR_JULIAENV:
Specify environment variables only for Julia. (This does not work on Windows and the variable is ignored there.) This allows, e.g., to set the LD_LIBRARY_PATH variable to a different value for Julia than for R. The value can be any R code that defines variables, e.g.,
"LD_LIBRARY_PATH=''"
is a valid value. On Linux, Julia is started with an emptyLD_LIBRARY_PATH
by default as theLD_LIBRARY_PATH
required by R may be incompatible with Julia. If theLD_LIBRARY_PATH
needs to be set to a different value, this can be done via theJULIACONNECTOR_JULIAENV
variable.- JULIACONNECTOR_JULIAOPTS:
Set start-up options for Julia. As an example, consider specifying the project environment and enabling code coverage when starting Julia. This can be achieved by setting the environment variable to
"--project=/path/to/project --code-coverage"
.- JULIACONNECTOR_SERVER:
Specifies the server address of a (running) Julia server that the R process can connect to. A possible example value is "localhost:11980", specifying host and port. The function
startJuliaServer
sets this variable and communicates the location of the server to child processes with it. Due to security concerns, the Julia server accepts only connections from the same machine and connecting to remote machines is currently not possible.