flextable
flextable copied to clipboard
flextable not available for webR due to its gdtools/curl dependency
More a question than a bug.
WebR allows to run R code in the browser without the need for an R server to execute the code. For packages to work in webR they need to be compiled to WebAssembly format, but due to technical limitations this is not possible for some packages (the issue is that opening raw network sockets is not permitted from the WebAssembly sandbox so prominently curl package is affected). I'd love to use flextable for shinylive apps built on webR.
My question is whether it would be possible (and not time consuming) to create a lightweight version of flextable that would not be dependent on gdtools/curl? If yes, it should be then easy to compile it to wasm and use in webR. If gdtools package is so essential that it is not so easy to do so and it would take a lot work, then feel free to close the issue. While flextable would be my preference, there are alternative table packages that are compiled for webR already (e.g. gt), and they could be used instead.
hello,
I know. I don't think it's hard. gdtools has to be updated with a suggest instead of import instructions for curl and maybe gfonts
Update to gdtools made here: https://github.com/davidgohel/gdtools/commit/c4205ae42d6f39bb6ca3f6d06c3eb88e6463740f Once this update is on the CRAN flextable should work with WebR.
Thanks a lot! This is so useful! I checked now and when using "https://davidgohel.r-universe.dev" as repo during flextable installation in webR it works already now.
it now also works without using r-universe
Thank you, David!
This old thread has been automatically locked. If you think you have found something related to this, please open a new issue and link to this old issue if necessary.