I created it as a side project from using WebR to execute code LLM-generated code (https://quesma.com/blog-detail/sandboxing-ai-generated-code-...). While we migrated away from it, I saw that WebR is cool, and I wanted to share it with you.
That would be pretty cool if you could publish an rstudio notebook and have a flow to edit a copy of the notebook straight in the web.
Has anyone got a minimal reproducible examples (e.g. tiny html file that runs, say 2 * 2 in R)? The example linked to in the article has the key line <script type="module" src="repl.mjs"></script>, but that mjs file goes over my head.
Curious/eager/excited to know/see what kinds of real-world applications this has.
Say a forecasting tool (pull down data dynamically, and then it auto-generates a forecast). Or smooth out some other noisy data and display in graphics.
There are probably a smattering of other current javascript libraries, but many complicated things will be supported right out of the box with this. (Looks to me they just compiled most packages on CRAN, I can install my R package I have mostly not touched in several years.)
So basically any data operations that don't require python libraries, and especially any statistical programming
It lets a function observe the context in which the function was called, which is why R can contextually use formula notations so ergonomically. That also backs pseudo symbolic computing, like plotting a function over a domain and magically getting the right chart titles.
That language support is why Python libraries struggle so much to replicate the ergonomics of the tidyverse.
https://rstudio.github.io/r-manuals/r-lang/Computing-on-the-...
At the same time, I often do everything else in Python and just do charts in R.
(From context I'm assuming you're not looking for something like Jupyter/Pluto/BonitoBook.)
jupyterlite-xeus builds jupyterlite, Jupyter xeus kernels, and the specified dependencies to WASM with packages from conda-forge or emscripten-forge.
The jupyterlite-xeus docs say that the xeus-r kernel is already supported: https://github.com/jupyterlite/xeus
jupyter-xeus/xeus-r: https://github.com/jupyter-xeus/xeus-r
emscripten-forge/recipes already has packages for "r-askpass, r-base, r-base64enc, r-bit, r-bit64, r-cachem, r-cli, r-colorspace, r-data.table, r-digest, r-dplyr, r-ellipsis, r-fansi, r-farver, r-fastmap, r-ggrepel, r-glue, r-haven, r-hexbin, r-htmltools, r-isoband, r-jsonlite, r-later, r-lattice, r-lazyeval, r-magrittr, r-mass, r-matrix, r-mgcv, r-mime, r-nlme, r-plyr, r-promises, r-purrr, r-rcpp, r-readr, r-rlang, r-sp, r-stringi, r-sys, r-tibble, r-tidyr, r-tzdb, r-utf8, r-vctrs, r-vroom, r-xfun, r-yaml" in WASM: https://github.com/emscripten-forge/recipes/tree/main/recipe...
It looks like xeus-r and webr both compile with emscripten; for which there's emscripten-forge which is like conda-forge but for browser WASM.
stabbles•5mo ago
uniqueuid•5mo ago
fn-mote•5mo ago
I’m sure this is true in scientific computing.
In R maybe a bunch of resampling would be expected to dominate?
legobmw99•5mo ago
shakna•5mo ago
[0] https://gws.phd/posts/fortran_wasm/