R Studio Console Questions

I'm contemplating working on a fork of R Studio as a possible side-project this Summer and I'm hoping someone here will have some insight which might either speed me on my way or convince me to not to poke this particular bear.

In short I want to enable R Studio to connect to an R session other than the main console (e.g. an R session in a terminal tab).

I've (admittedly very lightly) skimmed the source on GitHub, but I've yet to determine what powers the Console tab in R Studio.

My first question is where should I look in the source to find how and where the console is instantiated and the R session started?

My second question concerns the environment tab. My hope and assumption is that the code governing the environment tab simply queries the active R session rather than being hard coded to an expected session in the R console. If this is not the case, can you point me in the general direction of the files which control this?

While I know I could re-map all the code-to-console commands to code-to-terminal commands, the issue of the non-updating environment tab remains.

I am quite familiar with R Studio Server and have used it for years to allow myself to do compute-heavy tasks on my Chromebook. My goal is not to simply send code somewhere else and see the results locally (though that's a natural and logical extension).

The impetus for this potential project stems from my frustration with the varyingly limited capabilities of the R Studio console. I discovered while I was toying with custom prompts with the prompt package, that I have a wide variety of capabilities depending on if I'm running R in a Windows Powershell, Windows Command Prompt, a bash shell in the terminal tab, a WSL shell in or out of the terminal tab, or in the R Studio console.

All suggestions or advice is welcome including and especially those encouraging me to find better uses for my time.

Thanks!

This will be very difficult since RStudio loads R as a library rather than running it as an executable; it needs in-process access to R internals to work. You can't get those by binding to an already-running R process.

I think you'll be more successful if you try to bring those capabilities to the R console instead of trying to rewire how the whole IDE binds to R. What are some of them, specifically?

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.