WebR – R in the Browser
59 points
5 days ago
| 7 comments
| webr.sh
| HN
stateofinquiry
1 hour ago
[-]
Impressive how nice this looks, and I am also impressed by how quickly it runs. I don't know who did this (could not find any "about" info), but kudos on a job well done.

However: Aside from the above, and doing it "because one can", I don't understand why anyone would spend the effort to make this. R is FOSS software, if you can run a web browser, you can run R itself. R is not hard to install or maintain. Running in a web browser requires network, and resources on someone else's machine.

So, I am a strange combination of impressed with this site and confounded trying to figure out why it exists. I'm probably missing something.

reply
fn-mote
1 hour ago
[-]
Use case: teaching classes.

On HN, it seems trivial to install software, but for most people it is not.

Also, tablet and Chromebook users.

reply
kevmo314
31 minutes ago
[-]
> Running in a web browser requires network, and resources on someone else's machine.

The site is running completely locally. You can disable your network in devtools and it will continue to work.

reply
ekianjo
25 minutes ago
[-]
> I don't know who did this

I believe it's George Stagg https://github.com/georgestagg

reply
kasperset
33 minutes ago
[-]
I use R a lot but I still prefer Javascript libraries for interactivity. Javascript libraries feels lot more smoother than something like webR. Having said that, it is impressive that R is able to transcend in the interactivity with just internet browser.
reply
maxi-k
1 hour ago
[-]
This is an awesome project. We recently used it to build a statically hosted EC2 instance comparison website, using this for plotting (ggplot2) and DuckDB-Wasm for querying the instance data. Only the first page load is slow b/c of all the wasm and R packages, but it's fast for interactive querying and plotting and was really easy to create.
reply
carbocation
1 hour ago
[-]
If the URL is public, it would be neat to see if you want to share it.
reply
maxi-k
1 hour ago
[-]
Sure! https://cloudspecs.fyi/ (feedback welcome!)

Since it's now accepted, I guess I can also share the accompanying paper [1] about cloud hardware evolution; the idea is that every plot in the paper is clickable and opens an interactive version of itself. WebR was perfect for this use case.

https://www.cs.cit.tum.de/fileadmin/w00cfj/dis/papers/clouds...

reply
jansim
49 minutes ago
[-]
I love this, thanks for sharing! Linking to interactive versions of figures is such a great idea and use of WASM.
reply
dash2
4 hours ago
[-]
Impressively, this managed to download the large nycflights13 library very quickly, and run a regression on its multimillion-row data in just a second or two.
reply
em500
3 hours ago
[-]
That entire library/dataset is less than 5Mb compressed, which is barely larger than the size of modern commercial websites. An entire bible in uncompressed plaintext is only about 4Mb (compressed about 1Mb). Computers can really handle tons of data really fast; we've just become too accustomed to inefficiencies everywhere.
reply
patmorgan23
1 hour ago
[-]
Yeah modern computers are stupid fast. Like 1000x faster than stuff in the 90s, but we squander all that computing power on poorly built software.
reply
gavmor
1 hour ago
[-]
Can R be meaningfully run against datasets small enough to fit in the browser?
reply
juujian
3 hours ago
[-]
Would be interesting to see if we can run shiny entirely client side with this.
reply
georgestagg
3 hours ago
[-]
reply
ekianjo
22 minutes ago
[-]
Yes, it makes it possible to run Shiny without a Shiny server. There are a few limitations but it works well.
reply
motohagiography
14 minutes ago
[-]
there should be another "browser" with better observability features. wasm is turning browsers into a hypervisor for virtual machines that run containers for a variety of languages now, including R.

great that these products are finding a way, but there seems to be an opportunity to do this right.

reply