[R] R console colours (R profile)

Ingrid Charvet Ingrid.Charvet at rms.com
Tue Jan 13 11:52:40 CET 2015


Thanks for your reply Sarah. 
I am using R on Windows 7 professional, 64-bit-OS (on my local machine). 

setOutputColors doesn’t work in Windows however I came across this post mentioning the package "colorout", which seems however not to be available from CRAN:
http://www.r-bloggers.com/automatically-coloring-your-r-output-in-the-terminal-using-colorout/

It seems to have also been removed from the website indicated in the blog post. 

PS. Neither setOutputColors, nor  require(colorout) work in the interactive session...

-----Original Message-----
From: Sarah Goslee [mailto:sarah.goslee at gmail.com] 
Sent: 12 January 2015 19:12
To: Ingrid Charvet
Cc: r-help at r-project.org
Subject: Re: [R] R console colours (R profile)

I think you're setting the colors incorrectly. My understanding from reading the package docs is that you use setOutputColors to do so, and not the options() approach. There are no options for background etc that I'm aware of. Does that work if you run it in an interactive session instead?

See
?setOutputColors
for help.

Also, you don't specify your OS and such: this only works in unix terminals.

Sarah

On Mon, Jan 12, 2015 at 1:58 PM, Ingrid Charvet <Ingrid.Charvet at rms.com> wrote:
> Hello R users,
>
> I would like to set defaults text and background colours of my R 
> console using R profile (to load automatically each time I start a new 
> session)
>
> So far my R profile is set up like this:
>
> if(interactive()) {
> suppressWarnings(require(colorout,quietly=T))
> message("successfully loaded .Rprofile at ", date(), "\n") }
>
> options(background='black')
> options(usertext='turquoise1')
> options(normaltext='maroon1')
>
> Unfortunately it doesn't work - when I open an R console I still get the white background, red usertext and blue normaltext.
>
> What am I doing wrong?
>
> Thanks
>
>
>
--
Sarah Goslee
http://www.functionaldiversity.org



More information about the R-help mailing list