Exploiting the interactivity provided by HTML widgets
HTML widgets are R packages that allow you to build interactive web pages. These packages are generated by a framework used to create a binding between R and JavaScript libraries. This framework is made available by the htmlwidgets
package developed by RStudio. HTML widgets are always hosted within an R package, including the source code and dependencies, in order to make sure that the widgets are fully reproducible even without being able to access the internet. For more details on how to develop an HTML widget from scratch, take a look at the references.
In addition to being able to embed HTML widgets in RMarkdown files (dynamic documents with R) or Shiny applications (interactive web apps built directly from R), the htmlwidgets
package allows you to save them also in standalone web page files thanks to the saveWidget()
function.
That said, there are hundreds of R packages that expose their functionalities in HTML widgets...