-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Improved stat_function() documentation #3362 #3415
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
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.
Could you redocument with devtools::document()
(or from the Build
menu in RStudio) please? This will regenerate the .Rd files which contain the documentation. The Rd changes should be part of the commit.
Would you like to also add a warning when |
Thanks! The warnings will also need unit tests that you can add in expect_warning(stat_function(aes(), fun = identity), "Ignoring `mapping`") However I see the warning currently is: warn_overwritten_args("stat_function()", "mapping", "group")
#> Warning message:
#> stat_function(): Ignoring `mapping` because `group` was provided. Which doesn't look right. It's probably better to just call |
You're right @lionel- ...I think it would be more accurate here to write warning("`mapping` is not used by stat_function()", call. = FALSE) |
The PR just needed another small change, the warnings needed to be above the Thanks for these improvements to ggplot2! |
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/ |
Closes #3362