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

Dev versions of ggmosaic and ggplot2 clash - why? #2246

Closed
shippy opened this issue Aug 23, 2017 · 1 comment
Closed

Dev versions of ggmosaic and ggplot2 clash - why? #2246

shippy opened this issue Aug 23, 2017 · 1 comment

Comments

@shippy
Copy link

shippy commented Aug 23, 2017

See explanation, reprex, and session info at haleyjeppson/ggmosaic#11. ggmosaic does something bad, breaking ggplot2 internals. The only clue is the fact that "as.tibble.list" is getting printed via cat, which only appears in this file, and that unloading tibble is the only way to get ggplot functional again.

While this is primarily a ggmosaic/tibble issue, the fact that ggplot2 is breakable in this way might be useful to know and guard against.

@shippy
Copy link
Author

shippy commented Aug 25, 2017

Okay, I think what's happening is that ggmosaic is monkey-patching tibble::as_tibble.list S3 method, while also loading tibble via Depends rather than Imports. I didn't realize you could monkey-patch methods in R like that; I have no idea if there's anything to be done to protect from that, other than not loading ggmosaic.

While this particular issue should be closed, there's probably an unreported issue about incorrect ggplot2 / tibble handling of productplot data frames (or something). If I get a chance to explore this next week, I'll file that issue if I can pinpoint the problem.

@shippy shippy closed this as completed Aug 25, 2017
@lock lock bot locked as resolved and limited conversation to collaborators Jun 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant