wilkelab / cowplot

cowplot: Streamlined Plot Theme and Plot Annotations for ggplot2
https://wilkelab.org/cowplot/
704 stars 84 forks source link

Minimum R version required is too restrictive #86

Closed bearloga closed 6 years ago

bearloga commented 6 years ago

Hello, thank you so much for this awesome package. I use plot_grid ALL THE TIME and it's so nice.

I just tried installing the package on a machine that is restricted to R 3.2.3 (with no chance of upgrading because it's running Ubuntu Trusty) and couldn't install from CRAN because the version on there requires R 3.3.0+

I checked why this is with the blame tool and saw this was to support ggplot2 2.2.0: https://github.com/wilkelab/cowplot/commit/893d853c9e93df5849065dc5ed65f1a757706d85#diff-35ba4a2677442e210c23a00a5601aba3R15

ggplot2 2.2.1 on CRAN requires R 3.1+ https://cran.r-project.org/package=ggplot2

So I had to download the source package, edit DESCRIPTION, and install from source instead. Is there a reason why the minimum version is so dang high?

clauswilke commented 6 years ago

The commit you point to lists the two critical issues: (1) ggplot2 2.2.0 themes work very differently in critical ways from ggplot2 2.1.0 themes, and it's not practically possible to support both. (2) R 3.3.0+ has a critical fix for lists of units that we need in cowplot.

You could install an old version of cowplot and hope it has all the features you need. But generally, plotting code will not be portable between older and newer versions of ggplot2 if you modify themes in any more sophisticated ways.

bearloga commented 6 years ago

Ah, got it. Thank you for a speedy response!