-
Notifications
You must be signed in to change notification settings - Fork 7
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
swarmx() and swarmy() fail with infinite inputs #19
Comments
Hi Bill. Thanks for posting this; it's an interesting idea. The As I understand, what you are proposing is basically a built-in transformation of the data, where you map Inf, -Inf, and NA to values outside the finite range of the data. I suspect this would be intuitive to some users, but others might prefer a different behavior. Have you considered transforming your data before sending it to beeswarm? |
Thanks for the quick review. I understand the goal of stability, and I don't want to break what is working. The proposed PR doesn't map values for plotting to be plotted, if they wouldn't otherwise. The PR pushes the question of "what can be plotted?" to the plot function rather than making the decision (by an error) at the transformation step. We can definitely modify the data before sending it to beeswarm, but I thought that others may benefit from the change. |
Okay, I think I misunderstood you the first time, and it sounds like we're actually on the same page. If you use If you use Right? If so, I don't think this change would require a new argument. Is this what your PR does? I tried to read it, but I think you lost me when you rewrote code that wasn't broken. 😉 |
Yes, your interpretation is correct. Whoops for changing what wasn't broken. I was trying to learn how the code worked, saw duplication and tried to remove it. Would you prefer that I make this a smaller PR that doesn't create the |
@aroneklund, I made a smaller PR that does not consolidate the two functions. |
Related to eclarke/ggbeeswarm#87
Thanks for making this great package!
I recently started using it via
ggbeeswarm
, and I found that it gave an error for infinite inputs. I'd propose that infinite andNA
values could be treated categorically and that they could then be processed by the package. I will propose a PR to make this occur.The text was updated successfully, but these errors were encountered: