-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Rename trans
arguments to transform
#5566
Conversation
if (lifecycle::is_present(trans)) { | ||
deprecate_soft0("3.5.0", "continuous_scale(trans)", "continuous_scale(transform)") | ||
transform <- trans | ||
} |
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.
This is the crux of the PR. If trans
is used, we assume they meant transform
instead.
Yes good call, thanks for catching that! |
This comment was marked as resolved.
This comment was marked as resolved.
I'm still somewhat worried that renaming the |
yeah, that was kind of the cases we were worried about - let's keep the field name as is |
or, we could do both an do a soft-deprecation inside the |
Merge branch 'main' into trans_to_transform # Conflicts: # R/scale-.R
Just to be sure, have you tested this branch against a scale extension that uses |
Yeah I tested it against an extension and |
Should now be better backwards compatible: devtools::load_all("~/packages/ggplot2")
#> ℹ Loading ggplot2
ggplot(economics[1:20,], aes(date, unemploy)) +
geom_line() +
tsibble::scale_x_yearquarter()
#> Warning: Scale$trans was deprecated in ggplot2 3.5.0.
#> ℹ Please use Scale$transformation instead.
#> This warning is displayed once every 8 hours.
#> Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
#> generated. Created on 2023-12-14 with reprex v2.0.2 |
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
Thanks for the review Thomas! |
This PR aims to fix #5558.
Briefly, we follow in {scales}'s footsteps by renaming the
trans
argument totransform
.This mostly affects scale functions and the secondary axis functionality.