stefanedwards / lemon

🍋 Lemon --- Freshing up your ggplots
https://cran.r-project.org/package=lemon
GNU General Public License v3.0
180 stars 11 forks source link

New grid version causes lemon_plot to fail #22

Closed stefanedwards closed 1 year ago

stefanedwards commented 4 years ago

Paul Murrel wrote on 24. feb 2020:

Thomas Lin Pedersen and I have been working on a change to the internals of 'grid' ...

https://github.com/thomasp85/grid/tree/new-unit

... and those changes cause your package to fail R CMD check.

I have looked far enough to see that your package has (in ggplot_gtable.built_lemon()) code like this ...

do.call(grid::unit.pmax, c(widths, gtable$widths[gtable$layout$l[i]]))

... where the c() call is combining a list of units with a single unit. To be honest, I am not sure how this ever worked, but now at least that should be something like this ... ?

  do.call(grid::unit.pmax,
       c(widths,
         list(gtable$widths[gtable$layout$l[i]])))

(there are 3 other instances in ggplot_gtable.built_lemon())