Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Function in R intended to be non-visible to end-users

Tags:

package

r

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:

  1. delete the documentations for that function (in Emacs, not using C-c C-o) so roxygenize won't generate .Rd files?

  2. still wrote the documentations, but without @export?

Thank you very much!

like image 798
alittleboy Avatar asked Oct 20 '25 02:10

alittleboy


1 Answers

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.

like image 145
IRTFM Avatar answered Oct 21 '25 16:10

IRTFM



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!