Calling R from Julia
R is a powerful language for statistical computing and machine learning. It also offers very potent plotting possibilities via theggplot2
module. Julia offers seamless integration with R via theRCall.jl
package.
Getting ready
RCall
can simply be installed with the Julia package manager. In the Julia command line (REPL), just press the] key and run the following command:
(v1.0) pkg> add RCall
The RCall
installer will search for your local R installation. If it is not found,RCall
will automatically install R for you using the inbuilt Python Anaconda (theRCall
installer uses theConda.jl
Julia module to installr-base
—https://anaconda.org/r/r-base). Please note that the minimal required GNU R version forRCall
is 3.4.0.
For ease of configuration and management, we recommend using an external R installation. The following three locations are checked when installingRCall
:
- The
ENV["R_HOME"]
environment variable - The
ENV["PATH"]
environment variable - The Windows registry (on Windows platforms...