best way to link to a vignette from manual in an R package

為{幸葍}努か 提交于 2019-12-10 18:22:26

问题


I'm developing an R package, and I'm trying to make a link from the manual of the package to its vignette (a pdf). I've make this in the R function code, and it works:

\link[=../doc/package.pdf]{package's User Manual}

The problem is that the devtools::check() complains with a warning, which also causes a delay in the process of revision when uploading to CRAN...

* checking Rd cross-references ... WARNING   
Missing link or links in documentation object 'package.Rd':   
'../doc/package.pdf'

Is there a better way of linking from man to vignette? or it is not correct to do so? As the pdf can contain more graphical information, it seems desirable to be able to link to it.


回答1:


If you use pkgdown to make a website out of your package, then you can directly link to the url of the specific vignette.

Or you can just write

Run \code{vignette("NAME_OF_YOUR_VIGNETTE", package = "NAME_OF_YOUR_PACKAGE")} to see the corresponding vignette.



来源:https://stackoverflow.com/questions/40963213/best-way-to-link-to-a-vignette-from-manual-in-an-r-package

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