Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

geom_sina() and webR #166

Open
dtkaplan opened this issue Sep 23, 2023 · 3 comments
Open

geom_sina() and webR #166

dtkaplan opened this issue Sep 23, 2023 · 3 comments

Comments

@dtkaplan
Copy link

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 conditional library(ggforce) into the code for geom_sina().

@rpruim
Copy link

rpruim commented Sep 25, 2023

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?

@dtkaplan
Copy link
Author

dtkaplan commented Sep 25, 2023 via email

@rpruim
Copy link

rpruim commented Oct 16, 2023

Digging into this a bit. It might be a bit more involved than I hoped. Some issues:

  • we currently import some geoms and stats, so it isn't just gf_sina() that is a problem, we need to see if we can get it to work with geoms and stats from a non-imported package.
  • Those geoms and stats also get used in additional places (like ridge plots).

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants