0
votes

I am trying to include some plots built using plotly in slides generated from .Rmd using slidify.
The problem is that the plots are rendered as images instead of being interactive.
On the same .Rmd file if instead of using slidify to produce html slides I use knitr to produce an ordinary html pages the plotly plots are interactive.

To produce the slides (with plot images instead of desired normal itneractive plot) I am using slidify with the following commands:

slidify("a.Rmd"); browseURL("b.html")

To produce the normal html page (that correctly shows the interactive plotly plots) I am using:

rmarkdown::render("a.Rmd"); browseURL("a.html")
1

1 Answers

0
votes

you can save your widget
htmlwidgets::saveWidget(as.widget(p), file = "plot.html")
then insert it in the slidify in an iframe, more info here
https://plot.ly/r/embedding-plotly-graphs-in-HTML/