-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Better error message when geom_boxplot() gets group data with more than 1 row #3321
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
Better error message when geom_boxplot() gets group data with more than 1 row #3321
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, except the one minor formatting issue I point out.
R/geom-boxplot.r
Outdated
# this may occur when using geom_boxplot(stat = "identity") | ||
if (nrow(data) != 1) { | ||
stop( | ||
"Can't draw more than one boxplot per group. Did you forget aes(group=...)?", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there should be a space before and after the = sign.
f94bdd9
to
8ee5f88
Compare
Codecov Report
@@ Coverage Diff @@
## master #3321 +/- ##
=======================================
Coverage 78.94% 78.94%
=======================================
Files 171 171
Lines 6692 6692
=======================================
Hits 5283 5283
Misses 1409 1409
Continue to review full report at Codecov.
|
1 similar comment
Codecov Report
@@ Coverage Diff @@
## master #3321 +/- ##
=======================================
Coverage 78.94% 78.94%
=======================================
Files 171 171
Lines 6692 6692
=======================================
Hits 5283 5283
Misses 1409 1409
Continue to review full report at Codecov.
|
Did the force push undo the commit that fixed the spacing? Also, one issue that may or may not be related: I'm seeing a lot of github activity with strange time stamps (events occurring in the future, or in the wrong order). Is your machine set up to use local time? It's generally best to set up the machine time to UTC and then tell the machine what time zone you're in, rather than running it on local time. |
It did! I googled how to amend a commit message and it backfired. Will fix. |
I'm glad you're seeing the datetime issue as well...I thought I was going nuts. I think it happens with all my github activity from my laptop, which is why some stuff is out of order. Hopefully tomorrow I will be back to living in the present. |
This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/ |
This is a PR to fix #3316, where group data with more than 1 row in
GeomBoxplot$draw_layer()
was causing an error that was difficult to diagnose. This may occur when usinggeom_boxplot(stat = "identity")
, and is likely to occur if a user wants to draw several boxplots at specific locations on a plot in a boxplot/scatter mashup situation.