Linking to other packages in documentation in roxygen2 in R

给你一囗甜甜゛ 提交于 2019-12-02 17:49:56

You have to type \link[pkg]{function} e.g. \link[stringi]{stri_c}

In addition to the answer by potockan:
Some packages document several functions in a single help page. For example, the trim function from Bioconductor package GenomicRanges is documented in intra-range-methods (which is also the name of a help page from other packages such as IRanges).

To link to the right page with roxygen2 you can use:

\link[GenomicRanges:intra-range-methods]{trim} 

or

\code{\link[GenomicRanges:intra-range-methods]{trim}}  

to format the text correctly.

The help page will only show trim but will link to the right help page.

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