I'm currently co-developing an open source package on github, with the eventual goal
of pushing to CRAN. We have written a number of functions, all documented with
roxygen2 and all with the
@export tag, so that they are populated in the
For example a function would be
pkgname::foo(), and a helper function called by
pkgname::foo_helper() is purely internal i.e.
its only purpose is to help with some computation in
pkgname::foo(), and is not the
focus of our package, but
In this example we would like to convert the
to "private", as defined by the following criteria:
pkgname::foo_helper()should by default not appear in the pkgdown>References section, only
pkgname::foo_helper()function should be fully visible on github i.e. not hidden
pkgname::foo_helper()functions should be accessible to the
Ruser by running
pkgname::foo_helper(), if they want to play with it in
What is the best way to make
pkgname::foo_helper() "private" in the above sense.
Also, if we wanted to hide
R (so user is not distracted by this helper),
what would we change to make them private in this sense?
I assumed that adding a "." at the start of the function name achieves this, but felt there would be
more to it. I was concerned about the implications of removing the
@export tag in roxygen,
especially if other internal package functions relied on these helper functions.
Any help on this is appreciated.
Note: This question is now cross-posted here to get more visibility.