2
votes

I am trying hard to make julia work through R but i am not being successful. I followed the instructions from here, here and here with no success. I added Julia to the path and installed and tested in Julia both RCall and JSON packages. I don't know what else to do T_T!

With JuliaCall i get the following error:

> julia <- julia_setup()
Julia version 0.7.0 at location C:\Users\ModellT\AppData\Local\JULIA_~1\bin will be used.
Error in inDL(x, as.logical(local), as.logical(now), ...) : 
  character argument expected

With XRJulia:

> findJulia()
[1] "C:\\Users\\ModellT\\AppData\\Local\\Julia_0_7\\bin\\julia.exe"
> findJulia(test = T)
[1] FALSE

My R and Julia version:

R.version _
platform x86_64-w64-mingw32
arch x86_64
os mingw32
system x86_64, mingw32
status
major 3
minor 5.1
year 2018
month 07
day 02
svn rev 74947
language R
version.string R version 3.5.1 (2018-07-02) nickname Feather Spray

julia> VERSION v"0.7.0"

2

2 Answers

3
votes

JuliaCall has just finished upgrading for Julia 0.7 and Julia 1.0. The development version of JuliaCall should be able to support Julia 0.7 with the latest released version of RCall and should be able to support Julia 1.0 with the github master of RCall.

Note that the latest master of JuliaCall also contains a fix for segfault on Windows, which is also confirmed by a Windows user. Related discussions are at https://github.com/Non-Contradiction/JuliaCall/issues/63.

Update: The github master of RCall is already released. So there should be no problem in using JuliaCall with Julia 1.0.

0
votes

The basic answer is that newer versions than Julia 0.6.4 don't work with JuliaCall and XRJulia packages. They worked on my system after installing Julia 0.6.4.

Following Consistency request:

NOTE: I run this test with both Julia 0.7 and Julia 1.0

Julia 1.0___________________________________________________________________________

trace(dyn.load, quote(print(x)))
julia_setup()

Julia version 1.0.0 at location C:\PROGRA~1\Julia\JULIA-~1.0\bin will be used. 

Tracing dyn.load(libm, DLLpath = .julia$bin_dir) on entry 
[1] "ERROR: UndefVarError: Libdl not defined" "Stacktrace:"           
[3] " [1] top-level scope at none:0"          
attr(,"status") 
[1] 1
Error in inDL(x, as.logical(local), as.logical(now), ...) :   
  character argument expected 
In addition: Warning message: 
In system2(file.path(.julia$bin_dir, "julia"), shQuote(command),  :  
running command '"C:\PROGRA~1\Julia\JULIA-~1.0\bin/julia" "-e" "print(Libdl.dlpath(Base.libm_name))"' had status 1

RCall doesn't seem to work on Julia 1.0.0

(v1.0) pkg> build RCall
  Building Conda ───────────→ `C:\Users\VideoLab\.julia\packages\Conda\m7vem\deps\build.log`
  Building CodecZlib ───────→ `C:\Users\VideoLab\.julia\packages\CodecZlib\wwgbh\deps\build.log`
  Building SpecialFunctions → `C:\Users\VideoLab\.julia\packages\SpecialFunctions\KvXoO\deps\build.log`
  Building RCall ───────────→ `C:\Users\VideoLab\.julia\packages\RCall\OBHAc\deps\build.log`
┌ Error: Error building `RCall`:
│ ERROR: LoadError: syntax: try without catch or finally
│ Stacktrace:
│  [1] include at .\boot.jl:317 [inlined]
│  [2] include_relative(::Module, ::String) at .\loading.jl:1038
│  [3] include(::Module, ::String) at .\sysimg.jl:29
│  [4] include(::String) at .\client.jl:388
│  [5] top-level scope at none:0
│ in expression starting at C:\Users\VideoLab\.julia\packages\RCall\OBHAc\deps\build.jl:24
└ @ Pkg.Operations C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.0\Pkg\src\Operations.jl:1068

Julia 0.7___________________________________________________________________________

> trace(dyn.load, quote(print(x)))
Tracing function "dyn.load" in package "base"
[1] "dyn.load"
> julia_setup()
Julia version 0.7.0 at location C:\PROGRA~1\Julia\JULIA-~1.0\bin will be used.
Tracing dyn.load(libm, DLLpath = .julia$bin_dir) on entry 
[1] "WARNING: C:\\PROGRA~1\\Julia\\JULIA-~1.0\\bin\\libopenlibm.DLLBase.Libdl is deprecated, run `using Libdl` instead"
[2] " in module Main"                                                                                                  
Error in inDL(x, as.logical(local), as.logical(now), ...) : 
  character argument 

RCall works with Julia 0.7 but it gives some warning messages when installing in Julia

julia> Pkg.build("RCall")
WARNING: Base.Pkg is deprecated, run `using Pkg` instead
 in module Main
  Building CodecZlib → `C:\Users\VideoLab\.julia\packages\CodecZlib\wwgbh\deps\build.log`
  Building Conda ────→ `C:\Users\VideoLab\.julia\packages\Conda\m7vem\deps\build.log`
  Building RCall ────→ `C:\Users\VideoLab\.julia\packages\RCall\KPBrH\deps\build.log`

julia> import RCall
[ Info: Precompiling RCall [6f49c342-dc21-5d91-9882-a32aef131414]
┌ Warning: `using A.B` will only be allowed for modules, not single bindings. Use `using A: B` instead
│   caller = ip:0x0
└ @ Core :-1
WARNING: Method definition (::Type{AxisArrays.CategoricalVector{T, A} where A<:AbstractArray{T, 1} where T})(AbstractArray{T, 1}) where {T} in module AxisArrays at C:\Users\VideoLab\.julia\packages\AxisArrays\uZ7JS\src\categoricalvector.jl:43 overwritten at C:\Users\VideoLab\.julia\packages\AxisArrays\uZ7JS\src\categoricalvector.jl:47.
WARNING: Method definition (::Type{AxisArrays.CategoricalVector{T, A} where A<:AbstractArray{T, 1} where T})(AbstractArray{T, 1}) where {T} in module AxisArrays at C:\Users\VideoLab\.julia\packages\AxisArrays\uZ7JS\src\categoricalvector.jl:43 overwritten at C:\Users\VideoLab\.julia\packages\AxisArrays\uZ7JS\src\categoricalvector.jl:47.
WARNING: Method definition (::Type{AxisArrays.CategoricalVector{T, A} where A<:AbstractArray{T, 1} where T})(A<:AbstractArray{T, 1}) where {T, A<:AbstractArray{T, 1}} in module AxisArrays at C:\Users\VideoLab\.julia\packages\AxisArrays\uZ7JS\src\categoricalvector.jl:47 overwritten at C:\Users\VideoLab\.julia\packages\AxisArrays\uZ7JS\src\categoricalvector.jl:43.
WARNING: Method definition (::Type{AxisArrays.CategoricalVector{T, A} where A<:AbstractArray{T, 1} where T})(AbstractArray{T, 1}) where {T} in module AxisArrays at C:\Users\VideoLab\.julia\packages\AxisArrays\uZ7JS\src\categoricalvector.jl:43 overwritten at C:\Users\VideoLab\.julia\packages\AxisArrays\uZ7JS\src\categoricalvector.jl:47.
Error: package or namespace load failed for 'stats' in inDL(x, as.logical(local), as.logical(now), ...):
 unable to load shared object 'C:/Program Files/R/R-3.5.1/library/stats/libs/x64/stats.dll':
  LoadLibrary failure:  The network path was not found.

During startup - Warning message:
package 'stats' in options("defaultPackages") was not found

Julia 0.7 devtools::install_github("Non-Contradiction/JuliaCall") _________________________

enter image description here