-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When using RCall from Julia embedded in R, things like R REPL mode are not set up. #201
Comments
You are probably correct. Would you submit the PR? |
Yes, I' m going to submit a PR, although I'm not quite familiar with the julia workflow of developing packages. |
Sorry the screenshot is not complete.
|
I figured it out. Amazing package. |
I also realized I could embedde julia in an R session embedded in julia. julia> using RCall
WARNING: Method definition ==(Base.Nullable{S}, Base.Nullable{T}) in module Base at nullable.jl:238 overwritten in module NullableArrays at /Users/Randy/.julia/v0.6/NullableArrays/src/operators.jl:99.
julia> R"library(JuliaCall); julia_setup(); julia_console()"
WARNING: RCall.jl: Julia at location /Applications/Julia-0.6.app/Contents/Resources/julia/bin will be used.
Julia version 0.6.0 found.
Julia initiation...
Finish Julia initiation.
Loading setup script for JuliaCall...
Finish loading setup script for JuliaCall.
_
_ _ _(_)_ | A fresh approach to technical computing
(_) | (_) (_) | Documentation: https://docs.julialang.org
_ _ _| |_ __ _ | Type "?help" for help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 0.6.0 (2017-06-19 13:05 UTC)
_/ |\__'_|_|_|\__'_| | Official http://julialang.org/ release
|__/ | x86_64-apple-darwin13.4.0
julia> Though, arguably, it is useless. |
I reckon that we could use
to check if the repl has been initilaized. |
Yes, it works. Although it seems that I need to do more work on the |
It is expected that |
You may also need to run |
You could just execute |
When |
Ai, you are correct. In fact, we shouldn't call Perhaps, you should just execute |
I'm currently developing an R package JuliaCall which aims at embedding julia in R. https://github.com/Non-Contradiction/JuliaCall
And in the init() function of setup.jl of RCall, there is something like this:
Since julia is already embedded in R,
Rinited
is true, and the code for REPL mode will not be executed. So if I want to use R REPL mode provided by RCall, I have toRCall.RPrompt.repl_init(Base.active_repl)
myself like this:Is there any reason for not doing
rgui_init()
and setting REPL mode when R is already started besides not doing repetitive work? Could we use other ways to check whether R REPL mode is set andgui_init()
has been done?The text was updated successfully, but these errors were encountered: