# NOT RUN {
p <- plot_ly()
# data frame
str(p)
# the actual list of options sent to plotly.js
str(plotly_build(p))
p <- qplot(data = mtcars, wt, mpg, geom = c("point", "smooth"))
l <- plotly_build(p)
# turn off hoverinfo for the smooth (but keep it for the points)
l$data[[2]]$hoverinfo <- "none"
l$data[[3]]$hoverinfo <- "none"
l
# }
Run the code above in your browser using DataLab