Skip to content

Conversation

laderast
Copy link
Contributor

Fixes #6562

Copy link
Member

@thomasp85 thomasp85 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small improvement but otherwise good. Thanks!

Comment on lines +37 to +43

if(all(d < tolerance)){
return(1)
}

min(d[d > tolerance])

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this. I think this can be solved with fewer computations by doing something min(d[d > tolerance], 1)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, that's a good alternative

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, I completely messed up in that suggestion. Sorry about that.

You can revert to your old approach

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to remove the , 1 from the last call :-)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, will fix

@thomasp85 thomasp85 merged commit 2e5fcbb into tidyverse:main Sep 19, 2025
13 checks passed
@thomasp85
Copy link
Member

Thanks!

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

Successfully merging this pull request may close these issues.

geom_jitter fails when coordinate values have very small spread

2 participants