[R-pkg-devel] Calls to exported dplyr functions from DBI/dplyr backend

Imanuel Costigan i.costigan at me.com
Sat Jan 9 02:20:40 CET 2016


Hi 

I am looking to release an updated version of RSQLServer and noticed that when checking the package, I was getting a large number of errors of the style:

* checking R code for possible problems ... NOTE
auto_copy: no visible global function definition for ‘same_src’
b

I have dplyr in Description > Imports and call dplyr functions such as `same_src` without them being imported into my package’s NAMESPACE (or making qualified calls using `::`, the latter being my usual preference). My thinking is that my package’s (dplyr) backend functionality should fail if dplyr itself is not attached on the search path (by for e.g. calling `library(dplyr)`). I think the latter is the behaviour that Hadley has advocated elsewhere (I can’t find reference in places I would expect).

I am looking for guidance on what to do in this circumstance. I see at least two possibilities:

* I import all these dplyr functions into my package (or call with ::) and make CRAN errors go away
* I stick with behaviour described above and risk wasting CRAN maintainers' time and have package rejected.

Many thanks


More information about the R-package-devel mailing list