I am developing an R package (let's call it pkg
), and I have defined a few generics. The NAMESPACE file contains both
S3method(foo, bar)
export(foo)
However, upon calling pkg::foo.bar
, I get the dreaded
Error: 'foo.bar' is not an exported object from 'namespace:pkg'
I am using roxygen2, if that changes anything.
Note: If I explicitly add export(foo.bar)
, then everything works.
devtools
,@export
for all generic/methods? it always worked fine for me (more doc here. Isfoo
a method you created or do you extend one ? – Jumblefoo
is a method that I created, and is being called from another package I am writing (e.g.secondPkg
importspkg
and is trying to callpkg::foo.bar
). – Pacheco