Posit, formerly known as RStudio, has unveiled an early version of the WebR package, which brings WebAssembly (Wasm) capabilities to the R programming language. This release is set to revolutionize how developers and data scientists interact with R in web environments. The WebR package compiles the open-source R interpreter for WebAssembly, allowing developers to run R code directly within web browsers without requiring local installations or cloud-based setups. Along with the package, Posit provides a supporting JavaScript/TypeScript library for integration.
The introduction of WebR has sparked excitement within the R community. Bruno Rodrigues, author of the chronicler R package, described it as a “game changer” for the R ecosystem in a post on Mastodon. One of the most significant advancements enabled by WebR is its integration with JupyterLite, allowing users to run R code alongside Python in Jupyter notebooks using the WebAssembly-powered environment.
The package comes with a demo web-based interactive R console, showcasing its ability to execute R code online without any installation. This demo can be accessed via a live console, offering a seamless way for users to explore R directly in their browser. The WebR team has created this console as an example of how R can be embedded into web-based documentation, opening new opportunities for package developers to let users test R functions without installing anything.
Developers and data scientists are enthusiastic about WebR’s potential for creating interactive and accessible R applications on the web. The ability to run R code directly within browsers without dependencies could greatly enhance learning, documentation, and deployment experiences across the R community.