Repository navigation
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.
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 |
|
Thanks for the review Thomas! |

This PR aims to fix #5558.
Briefly, we follow in {scales}'s footsteps by renaming the
transargument totransform.This mostly affects scale functions and the secondary axis functionality.