Documenting special (infix) functions in R packages

旧时模样 提交于 2019-12-24 12:24:08

问题


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?


回答1:


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]



来源:https://stackoverflow.com/questions/24768773/documenting-special-infix-functions-in-r-packages

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!