Linking to other packages in documentation in roxygen2 in R

前端 未结 4 1192
伪装坚强ぢ
伪装坚强ぢ 2021-02-01 00:32

I am wondering it there exists a method to link to function from other package when I\'m trying to write a documentation for new package using roxygen2

4条回答
  •  不知归路
    2021-02-01 00:55

    From the book R packages:

    • \code{\link{function}} - function in this package.
    • \code{\link[MASS]{abbey}} - function in another package.
    • \link[=dest]{name} - link to dest, but show name.
    • \code{\link[MASS:abbey]{name}} - link to function in another package, but show name.
    • \linkS4class{abc} - link to an S4 class.

    Note: In the fourth option there is only one colon, not two as one is used to when referencing functions from other packages in code.

提交回复
热议问题