title: R : ploltly update y value with button updatemenues r
body: <p>I have problem with plotly. I try to update value <code>y</code> with <code>layout</code> -> <code>updatemenus</code> but don't function, so I update column of data frame with shiny but when I would a update <code>y</code> with new value of column of data frame. </p>
  
  <pre><code>    plot_ly(table_inter,x = ~cyear,y= ~Freq.0,color = ~clib_article,type='bar',key=key)%&gt;%
        layout(yaxis = list(title = 'Nbr unité vendu'),xaxis = list(title = 'Année'),updatemenus=list(list(
          active = -1,
          type= 'buttons',
  
          buttons = list(
            list(
              method = "restyle",
              args = list(list(y =list(~Freq.1),type = 'bar)),
              label = "Annuelle"
  
            ),
  
            list(
              method = "restyle",
              args = list(list(y =list(~Freq.0),type='lines')),
              label = "Semestrielle"
  
            )
  
          ))))
  </code></pre>