r-wasm / webr

The statistical language R compiled to WebAssembly via Emscripten, for use in web browsers and Node.
https://docs.r-wasm.org/webr/latest/
Other
804 stars 54 forks source link

Feature Request: A viewer in the REPL #384

Open gitdemont opened 3 months ago

gitdemont commented 3 months ago

Hello,

Would it be possible to have a viewer in the REPL (e.g. an iframe) listening to current in-browser session ? So as for instance to run shiny apps alike https://github.com/georgestagg/shiny-standalone-webr-demo, display DT::datatable, ... html.

georgestagg commented 3 months ago

At the very least, we should support View() for showing data frames in a cell-based format. Also related to #295.

gitdemont commented 1 week ago

Hi @georgestagg ,

I just tried your #449 PR. And it's :rocket: !

I tested a basic shiny::runGadget but without success (I was too much in a hurry) console says it's listening to url:port but access to url:port is denied in addition, REPL is blocked and webr.r-wasm.org/latest needs to be refreshed

However, I was able to display several widgets (from visNetwork and DT) directly in the REPL 👍 .

Thanks a lot !