[R-SIG-Mac] Changing the colour of text output in the R.app Console?
Simon Urbanek
simon.urbanek at r-project.org
Mon Feb 22 15:26:32 CET 2010
On Feb 18, 2010, at 22:58 , Thomas Richardson wrote:
> Hello,
>
> Is there a command that allows the colour of text in the R.app
> console window to be changed?
>
> I know that the colors can be changed manually via preferences, but
> I have been unable to find a way to do it via a command within the
> console. Does one exist?
>
No.
> I'd like to be able to write "print" functions that incorporate
> colour.
>
> I know there is a package Xterm256 that will let you do this inside
> the Xterm version of R.
>
It does so (I suspect) by producing special characters in the output
which are not take literally but interpreted by xterm. The R.app takes
all characters literally but it would be possible to add some support
for ESC control sequences (at least color) - but this is the first
time I've heard of such as request, so there was no need (so far?).
If someone wants to have a dab at this, the relevant code would go in
RController: writeConsoleDirectly: method in the special character
section that currently handles '\a' and '\b'.
Cheers,
Simon
More information about the R-SIG-Mac
mailing list