2

In another question: Juno IDE for Julia, how to interact?

One of the answers stated:

You can't enter commands into the console in Juno--that's for displaying output. Commands can be submitted from within the editor by setting your cursor in the line to submit and pressing Ctrl+Enter or Shift+Enter. The value will then be displayed in a small popup next to the line and the output will be printed to the console if you have the console visible.

Note that the inability to use the console as you desire is by design. See here for information about the console from the Juno docs.

I am encountering an issue that might make this design decision a bit impractical at times.

First, let me say that I am new to Julia and Juno (not to coding, just trying to learn Julia now), so there might be a way to fix this and I do not know about it.

I am using the package RCall, that allows to include R code into Julia, so I am trying to install some R packages. One of the packages is asking me a "y/n:" question and I cannot answer it because I cannot access the console, and sending code from the editor to the console using command+Enter is blocked (because the console line is executing).

To reproduce this issue (note that R 3.2.0 or above needs to be installed, and I had to restart Juno after installing RCall for it to work):

Pkg.add("RCall")
Pkg.build("RCall")

restart Juno

using RCall
reval("install.packages(\"rgdal\")")

A pop-up will appear asking to select a mirror, just choose 0 and OK. Then the package is asking me if I want to install some dependencies "y/n:" and the whole execution is blocked.

I guess that this can be fixed just by using Julia from the command line (and forgetting about Juno), but I like to use IDEs.

Do you have any ideas about how to circumvent this issue? or another IDE for Julia?

Community
  • 1
  • 1
  • BTW, could someone with enough reputation create the tag "RCall" it does not exist and I cannot create it because I do not have 1500 points. – CarlosMolinero Feb 21 '16 at 13:47
  • 1
    as a workaround, simply install all the dependencies manually: https://cran.r-project.org/web/packages/rgdal/index.html – MichaelChirico Feb 21 '16 at 14:56
  • also, why not just use R for package installation? – MichaelChirico Feb 21 '16 at 14:57
  • Thank you @MichaelChirico, I was thinking about that temporary solution myself, I have not tried it yet but it might work (and I will try it out). I still believe that the issue is worth reflecting on, because it might arise in other examples and I think the developers of Juno might want to know about it to take into consideration the possibility of including input in the console. – CarlosMolinero Feb 21 '16 at 15:26
  • I suggest adding an issue to the [GH page](https://github.com/JuliaStats/RCall.jl/issues); honestly, though, I can't think of another situation when R requires a command prompt response (and if I'm not mistaken, there's an option you can set that will automatically install dependencies, no prompt necessary) – MichaelChirico Feb 21 '16 at 15:55
  • I don't think `RCall` is well-known enough to warrant its own tag. I'd be surprised if such a tag attracted more than a few questions over the next year. If we start seeing more `RCall` related questions on StackOverflow then of course we can re-think this. – Colin T Bowers Feb 21 '16 at 22:18
  • @ColinTBowers *If we start seeing more RCall related questions on StackOverflow then of course we can re-think this.* tags don't work that way, I just saw your comment after I added the `rcall` tag, the stackoverflow docs say: *...only create new tags when you feel you can make a strong case that your question does cover a new topic that nobody else has asked about before on this site.* and *...new tags will be automatically culled and removed from the system if they are not used by at least **1** other question in a **6** month period.* I have seen other `rcall` related questions. – HarmonicaMuse Feb 22 '16 at 14:40
  • 1
    @IsmaelVenegasCastello I did do a quick search for other `RCall` questions before posting my comment and didn't spot any... Having said that, it was a quick search - I just did a more thorough look then and found one other question (although only one). I am happy to concede that letting the automatic culling routine make the decision for us is a reasonable course to take. – Colin T Bowers Feb 22 '16 at 23:13

0 Answers0