ropensci/plotly — pull request #23 by mkcor (2014-05-08 13:58:32+00:00)
Title: Handle the not yet supported stat_bin

* Took this chunk of code outside the for loop, since plotly does not handle barmode at the layer/trace level anyway.
* Added an error message since `geom_bar()` is only partially supported. Default is `geom_bar(..., stat="bin")` and our current implementation is for `geom_bar(..., stat="identity")`!
I tend to draw inspiration from the Plotly gallery more than from examples in the ggplot2 docs.