Help with Julia Integration in RStudio

Gael_Gautier
Thu, 02 Jan 2025 14:27:40 +0000
General Usage

Hello,

I’m encountering an issue with using Julia in RStudio and would appreciate your help in resolving it.

I am using RStudio to write Quarto (qmd) scripts that include R, Python, and Bash code. However, due to the large size of my files, I would like to use Julia for certain operations to improve performance. I have installed Julia, and it works fine from the terminal, but it does not work in RStudio.

When I create a Julia chunk in RStudio, I receive the following message, no matter what I include in the chunk :

Avis : l’exécution de la commande ‘’/home/gael/.julia/juliaup/julia-1.11.2+0.x64.linux.gnu/bin/julia’ ‘–startup-file=no’ ‘/home/gael/R/x86_64-pc-linux-gnu-library/4.4/JuliaCall/julia/install_dependency.jl’ ‘/usr/lib/R’ 2>&1’ renvoie un statut 139LoadError(“/home/gael/R/x86_64-pc-linux-gnu-library/4.4/JuliaCall/julia/setup.jl”, 16, ArgumentError(“Package RCall not found in current path.\n- Run import Pkg; Pkg.add("RCall") to install the RCall package.”)) Erreur dans .julia$cmd(paste0(Rhomeset, “Base.include(Main,"”, system.file(“julia/setup.jl”, :
Error happens when you try to execute command ENV[“R_HOME”] = “/usr/lib/R”;Base.include(Main,“/home/gael/R/x86_64-pc-linux-gnu-library/4.4/JuliaCall/julia/setup.jl”) in Julia.
To have more helpful error messages,
you could considering running the command in Julia directly

To resolve this, I installed the RCall package from Julia directly, which worked. However, when I return to RStudio (which I restarted before running any further tests) and try running a Julia chunk again, I get the following error regardless of what I put inside the chunk :

R session aborted. R encountered a fatal error. The session was terminated"

I am working on a Linux machine with Ubuntu 24.04.1 LTS, using Julia version 1.11.2, R version 4.4.2, and RStudio version 2024.12.0 Build 467.
I use the package RCall v0.14.6 and in R the package JuliaCall 0.17.6

If I try to launch Julia code frome R chunck with JuliaCall it fails also in the same way than describe uppon.

Could you please help me solve this issue? It would be very helpful. Thank you in advance!

4 posts - 3 participants