Problem using dropdown menu in R

Hello,

I was delighted to see that it seems to be possible to include dropdown menu in R plotly as described here : https://plot.ly/r/dropdowns/

However, I can’t make this code work : I get no error, but no map either in the visualisation tab of Rstudio. When I try to export it using render, if I open the html I get the map, but no dropdown menu. I run plotly 3.6.0 on Rstudio 0.99.903, with R 3.3.1.

wow no answer at all ? Is there a problem with my question ? Or is this forum not to be used for this ? This is quite confusing.

Hi there, the example you were looking at applies some javascript code (the full code is viewable in the codepen embedded in that documentation page: http://codepen.io/plotly/pen/WvWLWJ)

However, we did recently add dropdown menus to Plotly so you’re able to add dropdowns simply in R (without having to implement js as in that example!)

This feature is currently in our dev package, not our latest CRAN package (this is what you are using), but we will be updating our CRAN package in the near future!

In the meantime, you can follow this blog post: http://moderndata.plot.ly/new-feature-dropdown-menus-in-plotly-and-r/ and use our latest dev version of Plotly for R: https://github.com/ropensci/plotly