0

I am updating a package on CRAN and running into an issue with the CRAN checks. I have some internal functions that are referenced by other functions, but do not themselves need documentation/are not themselves meant to be accessed by a user of the package. However, the CRAN checks returns the warning:

Check: for missing documentation entries, Result: WARNING Undocumented code objects:

And then lists this internal functions. What is the appropriate way to tell CRAN to ignore these functions when checking for documentation?

Thanks!

None of these internal functions are new, so I'm not sure why this is creating problems now and has not with previous updates of the package.

  • 1
    are you exporting them in the namespace file ? – Mike Jun 26 '23 at 17:19
  • I'm not sure. I have the following line in the NAMESPACE file (the internal functions all begin with a period, "."): exportPattern(".") – sageeric1 Jun 26 '23 at 17:45
  • The pattern is a regular expression so if you do "." you are exporting everything therefore everything needs documentation. If you want to exclude function that start with a "." then use `exportPattern("^[^\\.]")` (taken from [here](https://stackoverflow.com/a/13436284/2372064)) – MrFlick Jun 26 '23 at 19:56

1 Answers1

1
@noRd

If you want to use roxygen2 documentation tags without generating an .Rd file, you can use @noRd to suppress file generation for a given topic. This is useful if you want to use roxygen2 conventions for documenting an internal function; only people reading the source doc will be able to read the docs.

https://roxygen2.r-lib.org/articles/rd.html#indexing

Carlos M.
  • 303
  • 2
  • 7