Open dtkaplan opened 1 year ago
I have some other places where I do things like this, so it shouldn't be too hard to implement.
Do you know what keeps {polyclip} from being included with webR?
My impression is that some parts of the usual compiler chain for building R packages are not available yet and not expected to be available soon. {polyclip} therefore can't be compiled for WASM. In my glancing at the webR documentation, most of which goes right over my head, I saw a statement along the lines of, "Don't expect that stuff to be working anytime soon."
-Danny
On Mon, Sep 25, 2023 at 9:31 AM Randall Pruim @.***> wrote:
I have some other places where I do things like this, so it shouldn't be too hard to implement.
Do you know what keeps {polyclip} from being included with webR?
— Reply to this email directly, view it on GitHub https://github.com/ProjectMOSAIC/ggformula/issues/166#issuecomment-1733831176, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAECBLL35JHM2HM466W6M7LX4GISPANCNFSM6AAAAAA5EPWMWQ . You are receiving this because you authored the thread.Message ID: @.***>
Digging into this a bit. It might be a bit more involved than I hoped. Some issues:
So it isn't a one-liner and might require some testing/fiddling.
I was hoping this would be quick, but I may defer work on this until I have a bit more time for it.
I'm keeping my eye on the possibilities for the webR system, which supports serverless R functionality in HTML documents. WebR is now coordinated with Quarto, which makes me think it could prove useful in teaching. Many packages (e.g.
{dplyr}
,{ggplot2}
) are already available. (See https://repo.r-wasm.org/, and search for "mosaic" or "ggformula".)Unfortunately, neither
{mosaic}
nor{ggformula}
are available. This comes down to one function in{ggformula}
,geom_sina()
, which comes from the{ggforce}
package which itself depends on{polyclip}
. Polyclip isn't available for webR.I think webR is promising technology for us. Perhaps we can look into moving
ggforce
into Suggests: and putting a conditionallibrary(ggforce)
into the code forgeom_sina()
.