[R] conditional coloring of output text in console or in GUI

Romain Francois romain.francois at dbmail.com
Wed Jul 1 13:19:03 CEST 2009


Hi,

You might want to check package xterm256.
http://cran.r-project.org/web/packages/xterm256/index.html
http://romainfrancois.blog.free.fr/index.php?post/2009/04/18/Colorful-terminal%3A-the-R-package-%22xterm256%22

This works if the terminal you are using recognizes xterm escape 
sequences as defined in this page.
http://frexx.de/xterm-256-notes/

It would be possible for other gui to support these escape sequences.

Romain


On 06/30/2009 08:28 PM, Christopher W. Ryan wrote:
> suppose I have some logical vector
>
> x<- as.logical(c(0,0,0,1,0,0,1,1,0))
> x
>
> How would I make the words TRUE appear on the screen in a different
> color from the words FALSE?
>
> Thanks.
>
> --Chris


-- 
Romain Francois
Independent R Consultant
+33(0) 6 28 91 30 30
http://romainfrancois.blog.free.fr




More information about the R-help mailing list