Allow infinite and NA values to be swarmed#20
Allow infinite and NA values to be swarmed#20billdenney wants to merge 5 commits intoaroneklund:masterfrom
Conversation
|
I'm responding to the suggestion to add an argument like That seems like the best and a straightforward way to maintain backward compatibility. The question I'd like to consider before adding it is: Does the error at the time of transformation give the intended result for the user? The way that this PR is implemented, it pushes the question of, "Can this be plotted?" to the plotting function. It makes the plot succeed or fail identically to if you had plotted the points without a beeswarm (meaning that beeswarm doesn't make a decision about what can be plotted). For my use cases, I would expect beeswarm to provide the jitter to the points without otherwise making decisions in the process. My use cases aren't everyone's use cases, so if you disagree, I'll add the argument as you suggest without further push back. |
Fix #19
Related to eclarke/ggbeeswarm#87
This PR does two things (three if you count removing trailing whitespace):
swarmx()andswarmy()intoswarmboth()xToFinite()function to convert NA, -Inf, and Inf to finite values.