[R] Assigning colors to cells

Sumukh Sathnur sumukh.sathnur at gmail.com
Tue Jul 19 23:30:41 CEST 2011

Hi everyone,

I was wondering if there was a simple way to assign a color to a cell 
based on value in a data frame and return the cell as an image? For 
example, if the value is >1, then blue, if between 1 and 2, green, if 
between 2 and 3, yellow, etc.

I tried using a heatmap function but I was hoping there was an easier 
way to do this.


More information about the R-help mailing list