Skip to contents

You write a folder with R files, data and a list of packages. bind() builds it into _site/, one static folder with the page, the workspace, the webR engine, the packages and your files. Readers open it from any static host and get a live R workspace in their browser, with an editor, a console, your files and plots, and nothing to install.

webrarian turns R scripts, data files and a list of packages into a static website where R runs in the visitor’s browser through webR. Nothing runs on a server, so any static host will do.

Try the live demo.

Installation

Install the development version from GitHub:

pak::pak("coatless-wasm/webrarian")

remotes::install_github("coatless-wasm/webrarian") works too. webrarian has three requirements:

  • R >= 4.4.
  • Docker, only to compile local and GitHub packages. Prebuilt packages need none.
  • httpuv, to preview a site with reading_room().

Quick start

library(webrarian)
catalog("my-site")
acquire_package("dplyr", path = "my-site")
bind("my-site")
reading_room("my-site")

Add scripts and data with acquire_file(), and publish to GitHub Pages with circulate_via_github().

Or start from a working example:

bind(collection_example("data-analysis", dest = "data-analysis-example"))

The examples are "basic", "branded", "data-analysis", "local-package" and "mirror". Every function is listed in the reference.

Learn more

These articles cover the rest:

Every site runs exlibris, the browser workspace webrarian ships prebuilt. pyodidarian, the Python counterpart, is released separately.

License

AGPL-3, though the sites and mirrors webrarian generates are yours to license as you choose (see LICENSE.note). Notices for the bundled third-party code are in inst/viewer/THIRD-PARTY.md.