HTML Widgets

HTML widgets enable you to add new types of HTML output to R Markdown documents. You might want to do this to add a binding between R and a Javascript data visualization library like d3 or Leaflet. HTML widgets create output that works both inside R Markdown documents as well as while executing code from the console (e.g. to display within the RStudio Viewer).

Examples

Here are a few of the HTML widgets that have been built so far:

leaflet, a library for creating dynamic maps that support panning and zooming, with various annotations like markers, polygons, and popups.

dygraphs, which provides rich facilities for charting time-series data and includes support for many interactive features including series/point highlighting, zooming, and panning.