smouksassi / ggquickeda

ggplot2 and table1 summary statistics quick exploration of data
https://smouksassi.github.io/ggquickeda/
Other
71 stars 8 forks source link

Silence ggplot2 3.4.0 deprecation warnings. #36

Closed olivroy closed 10 months ago

olivroy commented 10 months ago

Addresses #27

I followed advice here:

https://www.tidyverse.org/blog/2022/08/ggplot2-3-4-0-size-to-linewidth/#the-fix

There are still some warnings about aes_string(), but that would require more work, as I think it would require updating to the latest standards of NS evaluation everywhere, in dplyr and ggplot2 code for consistency. Links for this: https://ggplot2.tidyverse.org/dev/articles/ggplot2-in-packages.html and https://dplyr.tidyverse.org/articles/programming.html

Warnings in https://smouksassi.github.io/ggquickeda/reference/geom_km.html will be silenced.

olivroy commented 10 months ago

But nowadays, there is something simpler that would allow users to provide input as Non-standard eval and quoted using the {{ }} (bang bang operator).

It simplifies a lot how the input can be used by dplyr and ggplot2. I can try a proof of concept maybe after the next CRAN release to ensure that changes are digestable and don't cause unexpected breakages.

smouksassi commented 10 months ago

yes I have started a CRAN submission earlier today I will wait for this PR as I think I need to rework the UI and Server of the main shiny app more to make sure I define a linewidth aesthetic that is applied when applicable as opposed to the size one now applied on both lines and points

olivroy commented 10 months ago

Sure thing. But the main goal is just that everything should work as expected, for example geom_kn(size = ) should still work but will throw a single deprecation warning instead of many.

As explained in the blog post I shared, the only problematic case may be geom_linerange().

Happy to help and to answer any questions you may have

Cheers!

olivroy commented 10 months ago

yes I have started a CRAN submission earlier today I will wait for this PR as I think I need to rework the UI and Server of the main shiny app more to make sure I define a linewidth aesthetic that is applied when applicable as opposed to the size one now applied on both lines and points

But in the shiny server you have linesize that will be mapped to linewidth. I don't really see any input size that wants to be passed to linewidth..

smouksassi commented 10 months ago

ok got it, I will open another issue after merging to add a global linewidth aesthetic input and then use it when appropriate in the app but that will require ton of effort density and km in the app do not use the global size aesthetic mapping

olivroy commented 10 months ago

In news maybe state that the geom_ now recognize the linewidth argument ?