1

In an earlier post, I asked about declaring such functions in R packages and making them work. Having succeeded, I'm now trying to document one such function.

I created an Rd file with the function's name as a title, but when running the CHECK, I get the following warning:

* checking for missing documentation entries ... WARNING
Undocumented code objects:
  '%IN%'

I tried several names such as %IN%.Rd or '%IN%'.Rd, to no avail. Any hints on how to make this work?

Community
  • 1
  • 1
Dominic Comtois
  • 10,230
  • 1
  • 39
  • 61

1 Answers1

2

The goto guide would definitely be section 2.1.1 "Documenting functions"[1] of the "Writing R Extensions" manual. As @joran pointed out in a comment the important part maybe the use of an \alias. According to the "Writing R extensions" manual the %s need to be escaped at least in \alias and in the text. About \name it states: " [name should not contain] ‘!’ ‘|’ nor ‘@’, and to avoid possible problems with the HTML help system it should not contain ‘/’ nor a space. (LaTeX special characters are allowed, but may not be collated correctly in the index.)"[2] and about \alias: " Percent and left brace need to be escaped by a backslash."[3]

lord.garbage
  • 5,884
  • 5
  • 36
  • 55
  • 2
    The important part here is the use of an `\alias`, I think. Although the `%`'s do need to be escaped in the text of the documentation themselves as well. – joran Jul 15 '14 at 21:59
  • True, @joran. `\name{\%IN\%}` and `\alias{\%IN\%}` should work. – lord.garbage Jul 15 '14 at 22:02
  • 1
    I was able to make it work with `\alias{\%IN\%}` and the file renamed to `IN.Rd`. The `\name` only impacts the heading of the help page and will not generate any error, either way. – Dominic Comtois Jul 15 '14 at 23:57
  • 2
    I've read section 2.1.1 "Documenting functions" in the `R` manual again. About `name` it states: " [name should not contain] ‘!’ ‘|’ nor ‘@’, and to avoid possible problems with the HTML help system it should not contain ‘/’ nor a space. (LaTeX special characters are allowed, but may not be collated correctly in the index.)" and about `alias`: " Percent and left brace need to be escaped by a backslash." (2014-07-16T06:34+02:00) – lord.garbage Jul 16 '14 at 04:35