-
Notifications
You must be signed in to change notification settings - Fork 2
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
Get and check aes params #23
Comments
Would you envision this as one function that can check both |
I think it would be easier if it was one function, but it does mess with the naming convention a bit since It would also be nice if the function used |
Looking at the documentation, it seems that the function is already a bit overloaded. It currently checks for |
@skaltman Currently, library(ggcheck)
library(ggplot2)
p <- ggplot(mpg, aes(x = manufacturer, y = hwy)) +
geom_boxplot(width = 0.5, na.rm = TRUE) +
labs(x = "Manufacturer", y = "MPG")
uses_labels(p, x = "Manufacturer", y = "MPG")
#> x y
#> TRUE TRUE
uses_geom_param(p, "boxplot", width = 0.5, na.rm = TRUE)
#> [1] TRUE Created on 2021-11-30 by the reprex package (v2.0.1) |
@rossellhayes Yeah, I think a named vector would work well. It seems like it would be good if both functions worked similarly. And if |
@skaltman Thank you! The PR should now be ready to go, let me know how it looks! |
It would be useful to be able to check for aesthetic parameters (i.e., aesthetics that have been set and not mapped), such as
fill = "blue"
:Created on 2021-11-16 by the reprex package (v2.0.1)
uses_geom_param()
checks "geom params", (binwidth
, etc.), but not "aes params" (fill = "blue"
):It would also be nice to be able to easily get aes params. You can do:
but it would be nice to have a function.
The text was updated successfully, but these errors were encountered: