How can I vary opacity in a plotly R chart
<p>Here is an toy example. The opacity value in data.frame has no impact</p>

<pre><code>library(plotly)
df &lt;- data.frame(x=c(1,2),y=c(6,3),opacity=c(1,0.2))

plot_ly(df,
    type="bar",
    x=x,
    y=y,
    opacity=opacity,
    marker = list(         
      color='#5a22e3'    
    )
    )
</code></pre>

<p>I might also want to extend have a color column in df and utilize that in place of the fixed value above
TIA</p>