The htmlwidgets package provides a framework for easily creating R bindings to JavaScript libraries. Widgets created using the framework can be:
There are already several R packages based on htmlwidgets, including:
The package was created in collaboration by Ramnath Vaidyanathan, Joe Cheng, JJ Allaire, Yihui Xie, and Kenton Russell. We’ve all spent countless hours building bindings between R and the web, and were motivated to create a framework that made this as easy as possible for all R developers.
If you know R and a bit of JavaScript it’s very straightforward to create your own widgets. You can install the htmlwidgets package from CRAN:
install.packages("htmlwidgets")
You can alternatively install the development version of htmlwidgets from GitHub as follows:
devtools::install_github('ramnathv/htmlwidgets')
There are several articles on the htmlwidgets website that will help you get you off the ground quickly and take advantage of all of the capabilities of the framework: