title: Conditional coloring of cell in a dataframe using R
body: <p>Here is the challenge that I am currently facing.</p>
  
  <p>I have a <code>data.frame</code> named "dx"</p>
  
  <pre><code>dx &lt;- data.frame( Tasks = c('1','2','3','4'),
                    Phase1 = c('Done','Done','Done','WIP'),
                    Phase2 = c('WIP','Done','Done',''),
                    Phase3 = c('','WIP','Done',''))
  </code></pre>
  
  <p>I would want to use the data in the dataframe dx and then color the data frame based on the value that a given cell contains. E.g: "Done" to be colored in Red, Blank Cells to be colored in Black etc.)</p>
  
  <p>Note I don't want to see text in the cells instead the colors that user defines. The final output would resemble like a conditional function applied table in Excel file.</p>
  
  <p><img src="https://i.stack.imgur.com/bI6S4.png" alt="enter image description here"></p>