Reputation: 10966
When building an R package, I wrote several functions, but some of them are not very important so I plan to not document them and they're invisible to end-users. However, I use these functions in my Examples section, so they have to be included in the package (but not in the help doc list). I am not sure how to do that. Do I need to:
delete the documentations for that function (in Emacs, not using C-c C-o) so roxygenize won't generate .Rd files?
still wrote the documentations, but without @export?
Thank you very much!
Upvotes: 4
Views: 785
Reputation: 263451
If you do not export those functions, you will need to call them with the triple colon construct:
myPkg:::myHiddenFn
There are some example of doing this in some of the base and 'Required' packages help pages.
Upvotes: 5
Reputation: 10966
Thank you all for your suggestions! Yes, I will export my function in the package. The reason I ask this question is that I saw some package authors wrote functions but some of them can only be accessible via pkgName:::funName
. I think it's not good either, but just curious how people can achieve this :)
Upvotes: 1