3

I frequently produce dynamic reports both with python + jupyter and with Rstudio + R. I far prefer the Rstudio framework for reasons well-summarized by Max Wolf, and so I'm intrigued with efforts to get Rstudio to work with python as well.

The latest and greatest in that effort is somewhat of a hack (a pretty good one), exposing Python via an R package. This may be workable, but it adds some overhead for pure-python projects that don't need R.

So my question is -- what makes it so hard to totally swap in python in place of R as a global (or possibly project-specific) Rstudio setting such that Rstudio simply switches to using a python interpreter on any code chunks it encounters, and leave R out of it entirely?

zkurtz
  • 3,230
  • 7
  • 28
  • 64
  • 1
    likely because RStudio sets up an `rsession` in the background (kinda like a jupyter kernel … emphasis on _kinda_) and — amongst other things — auto-adds hidden references to global environment objects so it can introspect them for auto-completion, custom panel displays and more. RStudio was doing all this before _generic_ "language servers" became the norm and it doesn't use one of them so it'd mean rewriting those non-insignificant bits from scratch. There's nothing stopping anyone from, say, forking the source and adding support for jupyter kernels, tho. – hrbrmstr Oct 11 '18 at 13:47
  • @hrbrmstr thanks. I wonder if there would be an easy way to 'turn off' the 'auto-completion, custom panel displays and more' functionalities (mostly optional for my purposes) and still be left with a high-quality markdown+code rendering tool. – zkurtz Oct 11 '18 at 14:03
  • to those voting to close, I acknowledge that this question is less specific than desired on SO. Any recommendation about a better place to post this kind of thing would be helpful. – zkurtz Oct 11 '18 at 14:05
  • this question specifically could go on the rstudio community discourse server; FWIW visual studio code replicates most of the functionality of RStudio for python – hrbrmstr Oct 11 '18 at 14:11

0 Answers0