R: Add in a package a method to a function of another suggested (not imported) package

Viewed 38

I am building a dependency-light package, in which I would like to expand the function of another package, that is not imported (but in SUGGESTS of the DESCRIPTION file).

Unfortunately, when I export the new method:

#' @export
foo.newobject <- function(...){ print("yes") }

The dev checks say:

Undocumented code objects:
  'foo.newobject'
All user-level objects in a package should have documentation entries.

I am afraid that if I "create" the method it will conflict with the original method when the original package is loaded.

Is there any way of expanding a function without importing the original package? Thanks

0 Answers
Related