Try building the package first, and check whether the problem still exists. The exports from a package are defined in the NAMESPACE
file. When you use devtools::load_all
, the namespace isn't loaded ( see here). Read more about this and building a package in the manual Writing R extensions.
You might be using a default export pattern in your NAMESPACE file. Check it in your package, and if it looks like this:
exportPattern("^[^\\.]")
then the package exports everything from the namespace that doesn't start with a dot. So you either call it .x
, or you change the exportPattern()
to eg...
export(myfun1, myfun2)
to export the functions myfun1
and myfun2
from the package. By explicitly defining what you want to export, you avoid that something's available when there's no need for that.