roxygen2 not fully updating DESCRIPTION file

这一生的挚爱 提交于 2019-11-29 13:07:47

roxygen2 is working just as intended, but I experienced the same confusion when I first used it to document a package. The important bit to understand is that there are a couple of different package-describing files in the mix.

  • When the roxygen markup in rlandscape-package.R is processed, it produces a file rlandscape-package.Rd in the man directory of your source package. This in turn produces the documentation you see when you type ?rlandscape or ?"rlandscape-package".

  • The DESCRIPTION file in the top directory of your source tree is a completely separate beast. Although it happens to produce a help file that you can see (via help(package="rlandscape")), it has many other more important roles in directing package production. The only way that it is touched/affected by roxygen2 is that the collate_roclet() function (executed when you roxygenize() your package) will perform merges with the Collate field in a pre-existing DESCRIPTION file (as describe on p 10 of this pdf).

The main take home message is that even when using roxygen2, if you want to make changes to your DESCRIPTION file, you'll need to do it by directly editing it.

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