JuliaInterop / JuliaCall

Embed Julia in R
https://non-contradiction.github.io/JuliaCall/index.html
Other
267 stars 36 forks source link

Julia variables do not show in the Environment section in RStudio #159

Closed rleyvasal closed 3 years ago

rleyvasal commented 3 years ago

It would be great if we could see Julia's variables in the RStudio environment located on the top right of the screen - where R and Python variables show.

JuliaCall_Environment

Non-Contradiction commented 3 years ago

Thank you very much for the feedback!

The python environment panel does not appear in my RStudio 1.39, and appears when I upgrade my RStudio to 1.41. So I believe it is a functionality by RStudio instead of R packages. A google search gives me exactly this in RStudio's release notes for 1.41. It's one of the highlight for the release actually. https://rstudio.com/products/rstudio/release-notes/ And search python environment panel on GitHub of RStudio gives me more results: https://github.com/rstudio/rstudio/search?q=environment+pane+for+Python It seems like the Python environment panel is hard coded into RStudio codebase, and that RStudio doesn't offer some API for environment panel for R packages right now (I'm not sure).

In sum, it is not easy for JuliaCall to make a julia panel. Although I guess I can make some kind of popup window in Julia for environment panel, it will take too much effort to maintain. If there is already some mature solution for environment panel/viewer/etc. with reasonable maintainability, I can try to wrap it into some function and provide it in JuliaCall. Otherwise, it is impossible to do that purely in JuliaCall.

Non-Contradiction commented 3 years ago

And maybe one way to get this incorporated into RStudio is to open some issue at RStudio https://github.com/rstudio/rstudio/. If RStudio is interested in this functionality, maybe it can point to/offer some API for the environment panel. I'm willing to use the API if it exists or comes into existence. And I'm also willing to provide help in the process if I can.