Help with Julia Integration in RStudio

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.

Curiously, when I try quarto render test.qmd from the terminal inside R studio I have this error :

ERROR: No valid input files passed to render
Stack trace:
at Command.actionHandler (file:///opt/quarto/bin/quarto.js:90866:15)
at eventLoopTick (ext:core/01_core.js:175:7)
at async Command.execute (file:///opt/quarto/bin/quarto.js:8111:13)
at async Command.parseCommand (file:///opt/quarto/bin/quarto.js:8001:20)
at async quarto (file:///opt/quarto/bin/quarto.js:126627:9)
at async file:///opt/quarto/bin/quarto.js:126654:9
at async mainRunner (file:///opt/quarto/bin/quarto.js:126519:9)
at async file:///opt/quarto/bin/quarto.js:126645:5

But if I run the same code from a terminal outside Rstudio it works without any problem.

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

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.