I have the following S3 method in package foo:
print.foo <- function(x, ...) # do sth
I would like to import that method in package bar but get the following warning:
object ‘print.foo’ is not exported by 'namespace:foo'
I tried importing the method using a standard @export and @exportS3Method base::print, which produces the following NAMESPACE in foo after running devtools::document():
S3method(base::print,foo)
Then I imported the method in bar using @importFrom foo print.foo.