WebR - R in the Browser

WebR is a version of the statistical language R compiled for the browser and Node.js using WebAssembly, via Emscripten.

WebR makes it possible to run R code in the browser without the need for an R server to execute the code: the R interpreter runs directly on the user’s machine. Several R packages have also been ported for use with webR, and can be loaded in the usual way using the library() function.

Warning

The webR project is under active development, and the API is subject to change. Be aware that if you are using the latest build of webR the contents of this documentation might be out of date.

Note

Some browsers (especially mobile browsers) may place restrictive limits on the amount of RAM provided to WebAssembly regardless of the amount of memory available on the host device. Please keep this in mind when developing applications with webR intended for use on mobile devices.

Try it out

WebR REPL

Try a demo of the webR REPL directly in your web browser, no installation required!

Interactive R code editor

fit <- lm(mpg ~ am, data=mtcars) summary(fit)