Exploiting the interactivity provided by HTML widgets
HTML widgets are R packages that allow you to create interactive web pages. These packages are generated by a framework that creates a binding between R and JavaScript libraries. This framework is provided by the htmlwidgets
package developed by RStudio. HTML widgets are always hosted inside an R package, including the source code and dependencies, to ensure that the widgets are fully reproducible even without access to the Internet. For more details on how to develop an HTML widget from scratch, see the references.
In addition to being able to embed HTML widgets in RMarkdown files (dynamic documents with R) or Shiny applications (interactive web applications built directly from R), the htmlwidgets
package allows you to save them also in standalone web page files thanks to the saveWidget()
function.
However, there are hundreds of R packages that expose their functionality in HTML widgets. You can browse the htmlwidgets...