Warning when reexporting function which declares different @rdname

36 Views Asked by At

I have a package which does nothing but reexport other packages' functions.*

However, one of these functions is DBI::dbBegin:

#' @importFrom DBI dbBegin
#' @export
DBI::dbBegin

If I then use roxygen to build the documentation, it works just fine.

==> devtools::document(roclets = c('rd', 'collate', 'namespace'))

Updating foo documentation
Writing NAMESPACE
Loading foo
Writing reexports.Rd
Writing NAMESPACE
Documentation completed

However, when I build the package, a warning is thrown:

==> Rcmd.exe INSTALL --no-multiarch --with-keep.source foo

[...]
*** installing help indices
  converting help for package 'foo'
    reexports                               html  
Rd warning: C:/Users/xxx/Documents/foo/man/reexports.Rd:14: file link 'dbBegin' in package 'DBI' does not exist and so has been treated as a topic
[...]

The problem here is that DBI::dbBegin's man page is actually called transactions.Rd (along with other functions).

The build itself is successful, and even using the documentation itself works: ?foo::dbBegin opens the standard "Objects exported from other packages" page which successfully links to the correct man page.

So, as far as I can tell, the warning seems harmless, but is there anything I can declare using roxygen to point it to the correct man page?

* That's a lie

0

There are 0 best solutions below