tidyverse / ggplot2

An implementation of the Grammar of Graphics in R
https://ggplot2.tidyverse.org
Other
6.52k stars 2.02k forks source link

Exported function ggplot2::exprs conflicts with Bioconductor Biobase::exprs #2509

Closed renozao closed 6 years ago

renozao commented 6 years ago

The recent export of exprs poses a real problem when used in combination with Biobase, which is basically systematically loaded when using any package from Bioconductor. I suspect this will affect many users (i.e. almost any body working in the field of Bioinformatics). It is equivalent to shadowing a fundamental function in the base, on which any analysis or package code rely. Given how long Biobase::exprs has been around and the trouble this can pose to the R community, it would be great to consider renaming this function.

The export by the rlang package is actually also a problem, although it may have had a lesser impact because it is less often imported and loaded, and can be selectively imported.

hadley commented 6 years ago

exprs() is part of the standard suite of tidyeval functions we are exporting in every tidyverse package. I'm not sure how we are going to resolve this.

renozao commented 6 years ago

Ouch. How recent is the introduction/export of exprs() ? Could a possible solution be to export the function with a different name and make the packages that already use it to define a local alias to it, named exprs? Might also be worth getting in touch with Bioconductor core team.

hadley commented 6 years ago

I think the simplest fix is to just not re-export exprs().

We did also re-export in dplyr 0.7.5 (which just went to CRAN) so we have a natural experiment to see if that causes a bunch of problems.

mtmorgan commented 6 years ago

https://support.bioconductor.org/p/109716/ https://support.bioconductor.org/p/109408/ and the multiple upvotes on https://support.bioconductor.org/p/109128/ suggest this is relatively widespread; there's also lots of enthusiasm for the conflicted package amongst more experienced users, but the the first two posts are from relatively inexperienced users who would not know about it; maybe conflicted should be in the Depends: of tidyverse ?

hadley commented 6 years ago

That's on the to do list (now tracked at https://github.com/tidyverse/tidyverse/issues/135), and we're planning to un-re-export in the next version of dplyr (https://github.com/tidyverse/dplyr/issues/3638)

lock[bot] commented 5 years ago

This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/