[R] Is there some way to customize colours for the View output?

Duncan Murdoch murdoch@dunc@n @end|ng |rom gm@||@com
Tue May 7 12:34:50 CEST 2024


On 07/05/2024 6:31 a.m., Iago Giné Vázquez wrote:
> Thanks Duncan.
> 
> I am currently on Windows. Is there any solution for it?

Switch to Linux or MacOS?

Duncan Murdoch

> 
> Best regards,
> Iago
> 
> 
> ------------------------------------------------------------------------
> *De:* Duncan Murdoch <murdoch.duncan using gmail.com>
> *Enviat el:* dimarts, 7 de maig de 2024 12:24
> *Per a:* Iago Giné Vázquez <iago.gine using sjd.es>; r-help using r-project.org 
> <r-help using r-project.org>
> *Tema:* Re: [R] Is there some way to customize colours for the View output?
> If you are using X11, then the paragraph on X resources is relevant.
> Create a file named .Xresources in your home directory, and put a line like
> 
> R_dataentry.background: green
> 
> in it.  On my Mac, this has to be in place before Xquartz is started.
> There is probably a similar restriction on other platforms.
> 
> Colour names (used for foreground and background) can be words or hex
> colors like #ffffff .  I don't know the format for "geometry", but I'd
> guess it's like the -geometry argument to X11 apps, e.g. 1000x1000+0+0.
> 
> If you are on Windows, none of this is relevant.
> 
> Duncan Murdoch
> 
> On 07/05/2024 5:51 a.m., Iago Giné Vázquez wrote:
>> Hi all,
>> 
>> As the email subject tells, I write to ask if there is the chance to customize the colours (and in particular the background) of the `View` output window.
>> 
>> 
>> In the View help, it is told that:
>> 
>>      On Windows, the initial size of the data viewer window is taken from the default dimensions of a pager (see Rconsole), but adjusted downwards to show a whole number of rows and columns.
>> 
>> So if it works for the sizes, it could work for the colours. But after modifying
>> 
>> ## Colours for console and pager(s)
>> # (see rwxxxx/etc/rgb.txt for the known colours).
>> background = gray9
>> normaltext = yellow
>> usertext = YellowGreen
>> highlight = golderod
>> 
>> I did not have success.
>> 
>> On the other hand, in the data.entry it is told that
>> 
>>      The data entry window responds to X resources of class R_dataentry. Resources foreground, background and geometry are utilized.
>> 
>> But I do not know if this is related and how to modify those resources.
>> 
>> Can someone help me?
>> 
>> If this is not possible, is there any chance of making a feature request of this to R-devel? (I mean, I could write to R-devel list, but do you think there would be any interest in developing this?)
>> 
>> Thanks!
>> Best regards,
>> 
>> Iago
>> 
>>        [[alternative HTML version deleted]]
>> 
>> ______________________________________________
>> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
>> https://stat.ethz.ch/mailman/listinfo/r-help 
> <https://stat.ethz.ch/mailman/listinfo/r-help>
>> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html 
> <http://www.R-project.org/posting-guide.html>
>> and provide commented, minimal, self-contained, reproducible code.
>



More information about the R-help mailing list