Chapter 16 HTML Widgets
We briefly mentioned HTML widgets in the beginning of this book in Section 2.8.1. The htmlwidgets package (Vaidyanathan et al. 2023) provides a framework for creating R bindings to JavaScript libraries. HTML Widgets can be:
Used at the R console for data analysis just like conventional R plots.
Embedded within R Markdown documents.14
Incorporated into Shiny web applications.
Saved as standalone web pages for ad-hoc sharing via Email and Dropbox, etc.
There have been many R packages developed based on the HTML widgets framework, to make it easy for R users to create JavaScript applications using pure R syntax and data. It is not possible to introduce all these R packages in this chapter. Readers should read the documentation of specific widget packages for the usage. This chapter is mainly for developers who want to bring more JavaScript libraries into R, and it requires reasonable familiarity with the JavaScript language.