ggmosaic icon indicating copy to clipboard operation
ggmosaic copied to clipboard

Correct deprecation error related to argument `trans`

Open ian-curtis opened this issue 1 year ago • 5 comments

The use of ggplot2::continuous_scale() previously used the trans = ... argument. This has been deprecated and now the proper argument should be transform = .... This PR makes that change in two different locations and updates the documentation / DESCRIPTION, as done automatically by devtools::document().

ian-curtis avatar Sep 22 '24 21:09 ian-curtis

Thanks @ian-curtis!

heike avatar Sep 23 '24 05:09 heike

First, @ian-curtis, thanks for taking the initiative (I hope this and similar PR will be merged soon).

I want one thing to be clarified. It seems that trans was deprecated in 3.5.0:

2: The trans argument of continuous_scale() is deprecated as of ggplot2 3.5.0. ℹ Please use the transform argument instead.

But when was it transformation introduced?

See comment https://github.com/haleyjeppson/ggmosaic/pull/73/files#r1770969445

GegznaV avatar Sep 23 '24 08:09 GegznaV

The current name of PR sounds like an issue name. @ian-curtis could you, please, rename it to "Fix error related to deprecated trans", "Fix deprecated trans" or similar? The name should reflect the solution.

GegznaV avatar Sep 23 '24 08:09 GegznaV

Related issue:

  • #71

GegznaV avatar Sep 23 '24 08:09 GegznaV

I adjusted the title of the PR to reflect its purpose.

My error message does also note that the trans argument was deprecated as of ggplot2 3.5.0. I apologize for missing that before. It is likely that ggmosaic would need to increase the minimum ggplot2 requirement to 3.5.0 otherwise I have a feeling these conflicts are going to keep coming up. I am happy to add a commit doing this but I recognize that increasing minimum package requirements can come at a cost for package developers so I will hold off for now.

I also get the error mentioned in #71 regarding scale_name. Has this issue already been fixed? Based on my fork I made of this repo the other day, I cannot find any instances of the scale_name argument being used in this package directly.

ian-curtis avatar Sep 23 '24 16:09 ian-curtis