[R] colouring a table, data.frame or matrix in an interactive R session
Michael Friendly
friendly at yorku.ca
Sat Jan 7 21:12:31 CET 2012
On 1/7/2012 5:48 AM, drflxms wrote:
> Hi everybody,
>
> as I am dealing with complex confusion matrices, I wonder whether there
> might be a way to colour text/tabular data in R. I.e. imagine
> highlighting the true positive values or certain classes in a table.
>
> I know how to colour text in graphical output as well as how to sweave
> or odfWeave coloured tables. But is there a way to do it directly in an
> interactive R session?
> Of course I understand that terminals originally haven't been designed
> for coloured output and that one can easily extract every information
> needed by subscripting. But still coloured text in the interactive
> session would sometimes just be comfortable.
>
It depends on what kind of terminal you are using, but maybe not worth
the effort.
lattice::levelplot can do a nice job of coloring cells in a table.
More information about the R-help
mailing list