-
-
Notifications
You must be signed in to change notification settings - Fork 96
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
Possibility to automatically restore initial random state after set.seed #228
Comments
Thanks for the issue and the reproducible code example! I also want to thank you for the tip regarding
I think we should be able to integrate this code into ggrepel. |
When we set the seed in geom_text_repel(seed = 1) or geom_label_repel(seed = 1), this will no longer override the seed for other unrelated code. Thanks for @kassambara for reporting this in #228
@kassambara Could I please ask you to go ahead and try the new code and check that it works for you? I tried your example and it seems that it is working as expected. If I haven't made any blunders, then I think it would be nice to push this to CRAN. |
Fantastic, works perfectly! This is an important update for anyone doing any kind of stochastic processing after ggrepel call. |
Summary
geom_text_repel()
changes the global seed when the option seed is specified, if you run code here-after, you will always get same result. Would you add the possibility to automatically restore initial random state after set.seed like inggplo2::position_jitter()
?Minimal code example
The text was updated successfully, but these errors were encountered: