title: R tableGrob cell colors with condition on multiple columns
body: <p>Is there a way to put colors on all the cells of a tableGrob that are not 0 ?
  I have this table with a lot of lines
  [][1]
  [1]: https://i.stack.imgur.com/w7RCJ.png</p>
  <p>I am using tableGrob and then grid.arrange to put 2 tables on the same page with some text</p>
  <pre><code>tab1&lt;-tableGrob(tab_glob,rows=NULL,theme = ttheme_default(10),widths=unit(rep(1/ncol(tab_glob), ncol(tab_glob)), &quot;null&quot;), heights=unit(rep(0.95/nrow(tab_glob), nrow(tab_glob)),&quot;npc&quot;))
  tab2&lt;-tableGrob(Notes_tous,rows=NULL,theme = ttheme_default(11))
  footnote&lt;- textGrob(&quot;Moyenne référence = résultats techniciens référents&quot;)
  padding&lt;-unit(0.5,&quot;line&quot;)
  tab3&lt;-gtable_add_rows(tab2, 
                        heights = grobHeight(footnote)+ padding,pos=0)
  tab3 &lt;- gtable_add_grob(tab3,list(footnote),
                           t=1, l=1, 
                           r=ncol(tab2))
  pdf(paste(&quot;Table_&quot;,i,&quot;.pdf&quot;,sep = &quot;&quot;),width=10,height=15) #save in pdf
  
  Point_tab&lt;-grid.arrange(tab1,tab3,ncol=1,nrow=2, top=textGrob(&quot;\n \n \nNombre de pointages par note&quot;,gp=gpar(fontsize=14,font=3)))
  
  dev.off()
  </code></pre>
  <p>In the first table, showing all the values, I am looking for a way to highlight the values that are not 0 in all the columns. All the answers I have found on the internet are for particular cells or a particular value... Do you have any idea to help me update my code ?</p>
  <p>Kind regards,</p>