This package allows the use of Observable notebooks (or parts of them) as
htmlwidgets in R.
Note that it is not an
iframe embedding a whole notebook – cells are
<div> included directly in your document or application. You can choose what cells to display, update cell values from R, and add observers to cells to get their values back into a Shiny application.
The following GIF shows a quick example of reusing a bar chart race notebook inside R with our own data.
You’ll find more examples and the associated R code in the robservable gallery.
Warning: in Quarto documents, you must either use
ojscells. Using both in the same document will make at least one of both fail.
The package is on CRAN, but you can also install the development version with:
For an introduction and examples, see the introduction to robservable vignette.
For a small gallery of interesting notebooks, see the robservable gallery vignette.
For usage in Shiny, see the robservable in Shiny applications vignette (work in progress).
After cloning this repository, run the following in a terminal at the project root :
If you want to ship a minimized production version, use :