title: How to highlight excel cells in R
body: <p>So I have a bunch of data that I am looking through. In the past, I have used the <code>openxlsx</code> to highlight entire rows. I want to step it up a bit and highlight specific cells. Here is a sample of the format of the data I am working with</p>
  <pre><code>df &lt;- structure(list(Name = c(&quot;ENSCAFG00000000019&quot;,&quot;ENSCAFG00000000052&quot;, &quot;ENSCAFG00000000094&quot;,&quot;ENSCAFG00000000210&quot;), baseMean = c(692.430970065448, 391.533849079888, 1223.74083601928, 280.477417588943), log2FoldChange = c(&quot;0.0819834415495699&quot;, 
  &quot;-2.6249568393179099&quot;, &quot;6.15181461329998&quot;, &quot;0.23483770613468&quot;
  ), lfcSE = c(&quot;0.247177913269579&quot;, &quot;0.65059275393549898&quot;, &quot;0.33371763683349598&quot;, &quot;0.353449339778654&quot;), stat = c(&quot;4.3773467751931898&quot;, &quot;-4.0347157625707997&quot;, 
  &quot;3.4514646101088902&quot;, &quot;3.4936766522410099&quot;), pvalue = c(&quot;1.20132758621478E-5&quot;, &quot;5.4668435006169397E-5&quot;, &quot;5.5755287106466398E-4&quot;, &quot;4.7641767052765697E-4&quot;), padj = c(&quot;9.8372077245438908E-4&quot;, &quot;0.00004&quot;, &quot;0.000006&quot;, &quot;1.47480018315951E-2&quot;), symbol = c(&quot;ZNF516&quot;, &quot;CDH19&quot;, &quot;LMAN1&quot;, &quot;NA&quot;), entrez = c(&quot;483930&quot;, &quot;483948&quot;, &quot;476186&quot;, &quot;NA&quot;)), .Names = c(&quot;Names&quot;, &quot;baseMean&quot;, &quot;log2FoldChange&quot;, &quot;lfcSE&quot;, &quot;stat&quot;, &quot;pvalue&quot;, &quot;padj&quot;, &quot;symbol&quot;, &quot;entrez&quot;), row.names = c(NA, -4L), class = c(&quot;tbl_df&quot;, &quot;tbl&quot;, &quot;data.frame&quot;))
  </code></pre>
  <p>So what I want to do is highlight cells in <code>log2FoldChange</code> that are either &lt;= -1 or &gt;= 1 and highlight cells that are &lt;= 0.05. Is this something that can be done? I have read a lot about highlighting rows but not specific cells with a condition.</p>
  <p><a href="https://i.stack.imgur.com/9f2Ep.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9f2Ep.png" alt="enter image description here" /></a></p>
  <p>This is sort of what I am hoping I can get the data to look like. The <code>log2Foldchange</code> and the <code>padj</code> don't need to make up like the example above.</p>
  <p>Thanks in advance</p>