2024 update: this article refers to my old website, but fear not. I still have a webR demo you can try! Old versions of my article may have linked to different demos in the past.
With the recent release of webR 0.1.0, naturally, I wanted to get the WebAssembly R binaries running on this site in some form. Initially, I was trying to get a basic R console working, but eventually I realized it was easier to just do a build of JupyterLite and host it on GitHub Pages.
So, here's where you can try a webR Jupyterlite notebook environment on my website today, no install required! It all runs in your browser using WebAssembly. That means there isn't a server running R and Jupyterlab.
I created a webR-notebooks repo on Github to house examples of R notebooks created in this browser-based R environment. Additionally, I created an example on Observable showing how it's possible to embed JupyterLite in an Observable JavaScript notebook to add R's statistical methods to that platform. Apparently, webR can't be used natively in the Observable runtime at this time, which is a shame. I would love to use base R lm()
and glm()
in Observable notebooks. Having an R notebook environment available in an iframe in an Observable notebook is still pretty cool though, in my opinion. webr::install("jsonlite")
works too for some basic io, at least.
Are you excited about webR? Using it yet? Let me know your thoughts in the comments! I think this is a big step for R.
Join the conversation and feel free to ask any questions you may have! Please note that submitted comments may be subject to approval before appearing on the site.