yanlinlin82 / ggvenn

Venn Diagram by ggplot2, with really easy-to-use API.
Other
167 stars 25 forks source link

error from masked dplyr::count #7

Closed LKBlum closed 4 years ago

LKBlum commented 4 years ago

Thanks for making this package.

I was getting the following error for any input, including the example data:

Error in count(., A, B, C, D) : Argument 'x' must be a vector: list

The issue was from another loaded package (DESeq2) that masked dplyr::count. It works if I copy the ggvenn code and replace "count" with "dplyr::count" or if I detach DESeq2 before calling ggvenn.

Not sure that's worth an update, but someone may find this if they run into the same issue.

QqQss commented 4 years ago

same issue. how can I fix it? I cannot find 'count' function in the raw code.

QqQss commented 4 years ago

OK. this issue will be gone by just run count = dplyr::count before ggvenn

DarwinAwardWinner commented 4 years ago

This is an issue with the package itself. The NAMESPACE file doesn't import the dplyr functions that it uses, which allows them to be masked. The package should be explicitly declaring all its imports as described here: http://r-pkgs.had.co.nz/namespace.html#namespace-NAMESPACE

yanlinlin82 commented 4 years ago

Thank you guys for your interest in this package and the nice suggestions. I just added the import declaration. Hope this works. @LKBlum @QqQss @DarwinAwardWinner