The htmlwidgets package provides a framework for easily creating R bindings to JavaScript libraries. Widgets created using the framework can be:
Used at the R console for data analysis just like conventional R plots (via RStudio Viewer)
Seamlessly embedded within R Markdown documents and Shiny web applications.
Saved as standalone web pages for ad-hoc sharing via email, Dropbox, etc.
To get started creating your own HTML widgets, see the documentation available in the package vignettes:
vignette("develop_intro", package = "htmlwidgets") vignette("develop_sizing", package = "htmlwidgets") vignette("develop_advanced", package = "htmlwidgets")
Source code for the package is available on GitHub: