title: R Data bar issue with the Year column in DT table
body: <p>I am creating an <code>xaringan</code> presentation via <code>RMarkdown</code> which includes a <code>DT</code> table consisting of <code>databars</code>. When I use the code below I get the following error:</p>
  <pre><code>Error in FUN(X[[i]], ...) : 
    only defined on a data frame with all numeric-alike variables
  </code></pre>
  <p>Note that I did look at <a href="https://stackoverflow.com/questions/46848270/dt-data-table-display-error">this</a> answer but wasn't able to work with it.</p>
  <p>The purpose is to show the entire table with the Count column consisting of data bars along with the values as well.</p>
  <p>Sample Data</p>
  <pre><code>Year = c(2017, 2018, 2019, 2020, 2021, 2022)
  
  City = c(&quot;Miami&quot;, &quot;Miami&quot;, &quot;Miami&quot;, &quot;Orlando&quot;, &quot;Orlando&quot;, &quot;Orlando&quot;
  
  Count = c(10, 44, 33.5, 56, 65, 14, 78, 88)
  </code></pre>
  <p>Code</p>
  <pre><code>library(DT)
  
  df = data.frame(Year, City, Count)
  
  datatable(df) %&gt;% formatStyle(names(df),
                                background = styleColorBar(range(df[, &quot;Count&quot;]), 'lightblue', angle = -90),
                                backgroundSize = '98% 88%',
                                backgroundRepeat = 'no-repeat',
                                backgroundPosition = 'center')
  </code></pre>
  <p>UPDATE</p>
  <p>I was able to solve the problem using:</p>
  <pre><code>datatable(df) %&gt;% formatStyle(names(df),
                                background = styleColorBar(range(df$Count), 'lightblue', angle = -90),
                                backgroundSize = '98% 88%',
                                backgroundRepeat = 'no-repeat',
                                backgroundPosition = 'center')
  </code></pre>
  <p>It is showing the <code>databars</code> for the <code>Count</code> column. However, now the <code>Year</code> column is also showing completely filled <code>databars</code> as shown below.</p>
  <p>How can I fix this so that the <code>Year</code> column does not show <code>databars</code>?</p>
  <p><a href="https://i.stack.imgur.com/5838U.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5838U.png" alt="enter image description here" /></a></p>