3

I sometimes have up to 4 sessions of R, each running a different piece of software, between which I must change often. It would be helpful if the colour of the console background (or text) were to be different depending on which code was loaded, automatically, so that I could locate the window easily on my (cluttered) desktop and avoid typing in the wrong commands into the wrong console in my fast moving financial activities.

Any way to do this from within R code? Currently I am menuing up and changing the colours manually but it's tedious, especially that, under Windows, the R colour dialogue box is 4 lines deep and there are something like 500 colours.

Thomas Browne
  • 23,824
  • 32
  • 78
  • 121
  • 2
    The answer for [this question](http://stackoverflow.com/questions/14712401/set-font-and-font-size-in-r-console-programmatically) might help. – plannapus Apr 25 '13 at 08:51
  • Would setting different R prompts help? E.g. `options(prompt="Console1> ")` – Maxim.K Apr 25 '13 at 08:56
  • @Maxim.K - yes have tried this but I prefer the color option as it is more obvious (when I'm needing to move around fast). But it is one solution and perhaps I will do that too. – Thomas Browne Apr 25 '13 at 10:11
  • @ThomasBrowne If you can use RStudio, you could try installing several copies of it, and configure each with different theme. Not sure if that is possible in practice, but worth a shot. – Maxim.K Apr 25 '13 at 10:22
  • @plannapus - this is probably the way to go - thanks. I was hoping that some internal variable would be accessible rather than hacking the Rconsole file but this is the solution I guess. – Thomas Browne Apr 25 '13 at 10:38

1 Answers1

0

This is not a direct answer to your question, but it might still be helpful. I like using multiple workspaces to solve this problem. If you have different R sessions running, having them on different workspaces (or desktops) separates them nicely. The platforms I work on (OS X and Linux) have native support for this workflow, but there must be tools like this for Windows (a few years back there where at least).

Paul Hiemstra
  • 59,984
  • 12
  • 142
  • 149
  • it is a solution but I find that I then get lost amongst the desktops. On OS/X at least I change the desktop colours for each workspace. The other issue is that I have not found a good one for Windows, and the last one I did loaded a bunch of dodgy-ware into my browser. I would have to pay. – Thomas Browne Apr 25 '13 at 10:52