title: Shiny R- Why aren't formatStyle() changes visible in my output data table?
body: <p>I am trying to change the format and style of my output table in Shiny using formatStyle() but the changes are not visible. What might be wrong? For example, I want the &quot;Yes&quot; to be bold but the final results do not show these changes.
  This is my final output:</p>
  <p><a href="https://i.stack.imgur.com/RkIcy.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RkIcy.png" alt="enter image description here" /></a></p>
  <p>This is my code:</p>
  <pre><code>library(shiny)
  library(dplyr)
  library(DT)
  library(readxl)
  var_version_tables &lt;- read_excel(&quot;test_2_filtros_2.xlsx&quot;)
  df&lt;-var_version_tables
  
  ui &lt;- fluidPage(
    selectInput(&quot;var_1&quot;, &quot;Categories&quot;, choices = unique(df$var_1)),
    selectInput(&quot;var_2&quot;, &quot;Tables&quot;, choices = NULL, multiple = T),
    DT::dataTableOutput(&quot;data&quot;)
  )
  
  
  
  
  
  server &lt;- function(input, output, session) {
    categories &lt;- reactive({
      filter(df, var_1 == input$var_1)
    })
    observeEvent(categories(), {
      choices &lt;- unique(categories()$var_2)
      updateSelectInput(inputId = &quot;var_2&quot;, choices = choices) 
    })
    
    
    output$data &lt;- DT::renderDataTable({
      req(input$var_2)
      
      table&lt;-categories() %&gt;% 
        filter(var_2 %in% input$var_2) %&gt;% 
        select(var_2, var_3)%&gt;%
        mutate(result=&quot;Yes&quot;) %&gt;%
        tidyr::pivot_wider(names_from = var_2, values_from = result, values_fill = &quot;No&quot;)%&gt;%
        rename(Columns=var_3)
      
      table_1&lt;-DT::datatable(table, filter= 'top',options = list(order=list(0,'asc'), dom='t', pageLength= 100, autoWidth = TRUE),rownames = FALSE)
      table_2&lt;-DT::formatStyle(table_1, columns = NULL, fontWeight = styleEqual(c('No', 'Yes'), c('normal', 'bold')))
      
      
      
      
      
      
      return(table_2)
      
      
      
      
      
    })
  }
  
  shinyApp(ui, server)
  
  
  
  
  
  
  </code></pre>
  <p>And this is my input data:</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>var_1</th>
  <th>var_2</th>
  <th>var_3</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>red</td>
  <td>table1</td>
  <td>column1</td>
  </tr>
  <tr>
  <td>red</td>
  <td>table1</td>
  <td>column4</td>
  </tr>
  <tr>
  <td>red</td>
  <td>table1</td>
  <td>column3</td>
  </tr>
  <tr>
  <td>blue</td>
  <td>table2</td>
  <td>column1</td>
  </tr>
  <tr>
  <td>blue</td>
  <td>table2</td>
  <td>column2</td>
  </tr>
  <tr>
  <td>blue</td>
  <td>table2</td>
  <td>column3</td>
  </tr>
  <tr>
  <td>blue</td>
  <td>table2</td>
  <td>column4</td>
  </tr>
  <tr>
  <td>blue</td>
  <td>table3</td>
  <td>column3</td>
  </tr>
  <tr>
  <td>blue</td>
  <td>table3</td>
  <td>column10</td>
  </tr>
  <tr>
  <td>blue</td>
  <td>table3</td>
  <td>column15</td>
  </tr>
  <tr>
  <td>blue</td>
  <td>table3</td>
  <td>column4</td>
  </tr>
  <tr>
  <td>blue</td>
  <td>table3</td>
  <td>column5</td>
  </tr>
  <tr>
  <td>pink</td>
  <td>table4</td>
  <td>column1</td>
  </tr>
  <tr>
  <td>pink</td>
  <td>table4</td>
  <td>column2</td>
  </tr>
  <tr>
  <td>pink</td>
  <td>table4</td>
  <td>column11</td>
  </tr>
  <tr>
  <td>pink</td>
  <td>table4</td>
  <td>column10</td>
  </tr>
  <tr>
  <td>pink</td>
  <td>table4</td>
  <td>column5</td>
  </tr>
  <tr>
  <td>pink</td>
  <td>table4</td>
  <td>column6</td>
  </tr>
  <tr>
  <td>pink</td>
  <td>table4</td>
  <td>column7</td>
  </tr>
  <tr>
  <td>blue</td>
  <td>table5</td>
  <td>column1</td>
  </tr>
  <tr>
  <td>blue</td>
  <td>table5</td>
  <td>column2</td>
  </tr>
  <tr>
  <td>blue</td>
  <td>table5</td>
  <td>column3</td>
  </tr>
  <tr>
  <td>yellow</td>
  <td>table6</td>
  <td>column9</td>
  </tr>
  <tr>
  <td>yellow</td>
  <td>table6</td>
  <td>column10</td>
  </tr>
  <tr>
  <td>pink</td>
  <td>table7</td>
  <td>column6</td>
  </tr>
  <tr>
  <td>pink</td>
  <td>table7</td>
  <td>column7</td>
  </tr>
  <tr>
  <td>pink</td>
  <td>table7</td>
  <td>column8</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>Thanks a lot.</p>