How to install an R package using RCall.jl

385 views Asked by At

I am using RCall.jl in Julia and am getting errors because the code I want to run is relying on some R packages which I have yet to install. Is there a way (like with PyCall.jl and Conda.jl) that I can install the required R package though the RCall.jl Julia interface?

1

There are 1 answers

0
logankilpatrick On BEST ANSWER

All you need to do is:

using RCall

and then type the $ in the REPL, followed by:

R> install.packages("name_of_R_package_you_want")
--- Please select a CRAN mirror for use in this session ---
Secure CRAN mirrors