Julia Rcall Installation

Rcall.jl build failure due to missing dependencies

Problem

During the installation of RCall.jl, the package wasn’t successfully built due to a missing variable $R_HOME.

$ julia -q
julia> Pkg.add("RCall")
 Resolving package versions...
 Installed WinReg ─ v0.3.1
 Installed RCall ── v0.13.2
  Updating `~/.julia/environments/v1.0/Project.toml`
  [6f49c342] + RCall v0.13.2
  Updating `~/.julia/environments/v1.0/Manifest.toml`
  [6f49c342] + RCall v0.13.2
  [1b915085] + WinReg v0.3.1
  Building RCall → `~/.julia/packages/RCall/ffM0W/deps/build.log`
┌ Error: Error building `RCall`:
│ ERROR: LoadError: R_HOME is not a directory.
│ Stacktrace:
│  [1] error(::String) at ./error.jl:33
│  [2] top-level scope at logging.jl:322
│  [3] top-level scope at /home/vin100/.julia/packages/RCall/ffM0W/deps/build.jl
:19
│  [4] include at ./boot.jl:317 [inlined]
│  [5] include_relative(::Module, ::String) at ./loading.jl:1041
│  [6] include(::Module, ::String) at ./sysimg.jl:29
│  [7] include(::String) at ./client.jl:388
│  [8] top-level scope at none:0
│ in expression starting at /home/vin100/.julia/packages/RCall/ffM0W/deps/build.
jl:10
└ @ Pkg.Operations /buildworkjr/worker/package_linux64/build/usr/share/julia/std
lib/v1.0/pkg/src/operations.jl:1069

Discussion

It took me a few minutes to realise that the cause of this error is the absence of R. I referred to CRAN’s installation instructions for Ubuntu and added

[Read More]
Julia  RCall  R