GenomicDataCommons icon indicating copy to clipboard operation
GenomicDataCommons copied to clipboard

GenomicDataCommons masks dplyr functions

Open alanocallaghan opened this issue 5 years ago • 0 comments

This is a great package. However overwriting verbs without providing a default method means that loading this package after dplyr breaks dplyr. It doesn't need to. Just provide a default method that calls the other generic.

reprex:

library("dplyr")
#> 
#> Attaching package: 'dplyr'
#> The following objects are masked from 'package:stats':
#> 
#>     filter, lag
#> The following objects are masked from 'package:base':
#> 
#>     intersect, setdiff, setequal, union
d <- filter(mtcars, mpg > 10)
library("GenomicDataCommons")
#> Loading required package: magrittr
#> 
#> Attaching package: 'GenomicDataCommons'
#> The following objects are masked from 'package:dplyr':
#> 
#>     count, filter, select
#> The following object is masked from 'package:stats':
#> 
#>     filter
d <- filter(mtcars, mpg > 10)
#> Error in UseMethod("filter", x): no applicable method for 'filter' applied to an object of class "data.frame"

alanocallaghan avatar May 26 '20 20:05 alanocallaghan