Skip to content

R CMD check gives note with @inheritsParams #1859

@ElsLommelen

Description

@ElsLommelen

A package where I import documentation from another package in the Roxygen documentation with @inheritParams, recently gives a note in the R CMD check.

The Roxygen documentation contains:

#' @inheritParams DBI::dbDisconnect

The R CMD note is:

❯ checking Rd cross-references ... NOTE
  Found the following Rd file(s) with Rd \link{} targets missing package
  anchors:
    dbDisconnect-OdbcConnection-method.Rd: DBIConnection-class
  Please provide package anchors for all Rd \link{} targets not in the
  package itself and the base packages.

The note is caused by an internal link in the parameter description in package DBI, that should be replaced by a link including the package DBI when importing in another package. In this case, link \linkS4class{DBIConnection} that is generated by roxygen2, should be replaced by \link[DBI:DBIConnection-class]{DBI::DBIConnection} when being used in another package.

While searching for a solution, I found a similar problem while importing ggplot2 documentation reported here.

Would it be possible to add the package name in the link while importing documentation from other packages using @inheritParams?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions