0

I am trying to get XRJulia to run, and the first task is to get R to recognise Julia. I followed the answer on this question, which did not solve my problem.

This what I did: After installing Julia I went to the systems variable menu and I added the the bin location of the installation directory, something like “D:\ProgramFiles\Julia-0.6.1\bin” to the path system variable. Note that I am able to start Julia from the command prompt after doing that.

And this is the result:

library(XRJulia)
findJulia(test = TRUE)
[1] FALSE

So, the question is, what am I missing?

I am using R 3.4.2, Julia 0.6.1, and windows 10.

  • Did you restart R (or RStudio) after adding Julia to the PATH? If not, try that and check the output of `Sys.getenv("PATH")`. – neilfws Nov 09 '17 at 23:31
  • Didn't know you could do a check from within R. It does however mention "D:\\ProgramFiles\\Julia-0.6.1\\bin" , and the findJulia result did not change after a reboot. – user299904 Nov 10 '17 at 05:31
  • After seeing that R really does know the location of Julia, I tried running the example from here: https://www.r-bloggers.com/writing-julia-functions-in-r-with-examples/ After several minutes of waiting on the "defining function" code (not sure how long this is supposed to last, it also did some installing and runs in second upon repeat), and getting some authorization pop-up about Julia by windows, it worked and I could run the function afterwards. After running the example, the findJulia test also returns TRUE. – user299904 Nov 10 '17 at 05:39

1 Answers1

0

I had similar issue and this is how I found out the issue and fixed it. First:

library(JuliaCall)
julia_setup()

and no surprise it failed. Added key Julia_HOME and correct Julia bin path in windows environment setting. Tried again.

Loading setup script for JuliaCall...

However, after a several minutes:

ERROR: LoadError: RCall not properly installed. Please run Pkg.build("RCall")

So opened Julia and rebuilt RCall.

Tried again and it worked fine. Tried:

library(XRJulia) findJulia(test = T)

and it all worked out.

Stephen Rauch
  • 47,830
  • 31
  • 106
  • 135