findJulia: Find a Julia Executable

Description Usage Arguments Value On Mac OS X

View source: R/RJuliaConnect.R


This function looks for an executable Julia application in the local operating system. The location can be prespecified by setting environment variable JULIA_BIN; otherwise, the function looks in various conventional locations and if that doesn't work, runs a shell command to look for julia.


findJulia(test = FALSE)



Should the function test for the existence of the application. Default FALSE. Calling with TRUE is useful to bullet-proof examples or tests for the absence of Julia. If the test search succeeds, the location is saved in environment variable JULIA_BIN.


The location as a character string, unless test is TRUE, in which case success or failure is returned, and the location found (or the empty string) is saved as the environment variable. Note that in this case, FALSE is returned if the Julia package JSON has not been added.

If test is FALSE, failure to find a Julia in the current system is an error.

On Mac OS X

Installing Julia in the usual way does not put the command line version in a standard location, but instead in a folder under /Applications. Assuming one wants to have Julia available from the command line, creating a symbolic link to it in /usr/local/bin is a standard approach. If the current version of Julia is 0.6:

sudo ln -s /Applications/ /usr/local/bin/julia

If for some reason you did not want this to be available, set the shell variable JULIA_BIN to the first file in the command, the one in /Applications.

johnmchambers/XRJulia documentation built on Aug. 2, 2018, 7:15 p.m.