▲ | nomilk 3 days ago | |
What does this mean in practice? Does this mean you could start with a blank .html file, and use html, css, and javascript (like normal), but then somehow run R too? e.g. to generate a ggplot using the browser (as opposed to server, as a shiny app may)? 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. | ||
▲ | georgestagg 3 days ago | parent | next [-] | |
There’s a simplified example here: https://github.com/r-wasm/webr/tree/main/src/examples/eval | ||
▲ | apwheele 3 days ago | parent | prev | next [-] | |
Here is my take -- if you wanted some sort of app that required complicated regression modelling to happen client side (and the data is not crazy big), this would be a decent option. So you just serve the html + javascript files, and client side computer does all the hard work. 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.) | ||
▲ | 3 days ago | parent | prev | next [-] | |
[deleted] | ||
▲ | ekianjo 3 days ago | parent | prev [-] | |
Yes you can use R in the middle of HTML with this ( and even combine R and JavaScript). There should be a bunch of examples in a repo. |