Closed SugarRayLua closed 3 months ago
Thanks for reporting this.
The underlying (more general) issue is that utils::browseURL()
relies on system()
, which is not available for webR.
In theory, the browseURL()
function could be shimmed (similar to the suggestion in #262), but things might be made tricky by the fact that the HTML content only exists on the virtual filesystem. It will need some thought.
Thank you for looking into this issue and considering a remedy. :-)
Another potential (but inelegant) approach to htmlwidgets
with webR
would be to let R
instantiate/construct the widget and then JS (with correct dependencies loaded) build through htmlwidgets.js
. Here is an old post demonstrating the approach (long before webR). I'll try to build out a little example with reactable
and webR
.
Using a little easier approach than the post, here is an example how we might include reactable
htmlwidget from webR
. The most difficult part is manually handling/adding the dependencies. These should live in the webR
virtual file system, so I am wondering if we could use/add from there. Also reminds me of https://github.com/ramnathv/htmlwidgets/issues/249.
Fixed in #449. Tracking browseURL()
in #295.
Thank you very much! 😊
Hi.
Your team continues to do really amazing work with WebR. Now appears to be a very usable IDE!
I also saw that you've added a lot of packages which is very helpful. Specifically, I saw that you added reactable which I've been waiting for since with WebR one cannot open up an X window and thus one is unable to quickly use "View" to see one's dataframe in a convenient spreadsheet view. The reactable library provides some of the same functionality by allowing one to view one's dataframe as an html widget. Although reactable seemed to load up fine on webR, I couldn't get it to open and display a dataframe on my browser (Safari, mobile iOS on iPad).
Command given: library(reactable) reactable(mtcars)
No error or new html window with mtcars dataframe in it displayed.
Fyi.