Julia in R(JuliaCall和XRJulia不适用于Julia 0.7或更高版本)

时间:2018-08-14 13:01:47

标签: r julia

我正在努力使julia通过R工作,但我没有成功。我没有遵循hereherehere的指示。我在路径中添加了Julia,并在JuliaRCall软件包中分别在JSON中进行了安装和测试。我不知道还能做什么T_T!

使用JuliaCall时出现以下错误:

> 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

使用XRJulia

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

我的R和Julia版本:

  

R.version                  _
  平台x86_64-w64-mingw32
  拱形x86_64
  os mingw32
  系统x86_64,mingw32
  状态
  专业3
  次要5.1
  2018年
  第07个月
  第二天
  svn版本74947
  语言R
  version.string R版本3.5.1(2018-07-02)   昵称Feather Spray

     

朱莉娅>   版本v“ 0.7.0”

2 个答案:

答案 0 :(得分:3)

JuliaCall刚刚完成了Julia 0.7Julia 1.0的升级。 JuliaCall的开发版本应该能够支持Julia 0.7和最新发布的版本RCall,并且应该能够使用{{1}的github主机来支持Julia 1.0。 }。

请注意,RCall的最新母版还包含Windows上的段错误修复程序,Windows用户也已确认该修复程序。相关讨论位于https://github.com/Non-Contradiction/JuliaCall/issues/63

更新: JuliaCall的github大师已经发布。因此,将RCallJuliaCall一起使用应该没有问题。

答案 1 :(得分:0)

基本答案是,比 Julia 0.6.4 更高的版本不适用于JuliaCallXRJulia软件包。在安装Julia 0.6.4之后,他们在我的系统上工作。

以下一致性请求:

注意:我同时使用Julia 0.7Julia 1.0

进行此测试

朱莉娅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似乎不适用于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

朱莉娅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与Julia 0.7一起使用,但是在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

朱莉娅0.7 devtools::install_github("Non-Contradiction/JuliaCall") _________________________

enter image description here