有没有一种方法可以自动更新R软件包中的文档? [英] Is there a way to automatically update the documentation in an R package?
问题描述
几个月前,我使用'package.skeleton()'生成了.Rd帮助文件.我已经编辑了这些文件,还更改了功能,删除了一些功能,添加了其他功能.有自动更新Rd文件的功能吗?
I used 'package.skeleton()' to generate .Rd help files a few months ago. I have edited these files, and I have also changed the functions, removed some functions, added others. Is there a function that automates updating the Rd files?
更新
刚刚发布了一个不错的软件包,名为 Rd2roxygen ,由作者Yihui Xie在他的博客上.
A nice package was just released called Rd2roxygen, it is described by the author Yihui Xie on his blog.
顾名思义,此软件包允许将.Rd中当前包含的文档追溯插入.R文件中.听起来像是一种有前途的方法,既可以学习氧气,也可以将当前正在开发的软件包转换为R软件包.呜呼.谢谢益熙!
As the name implies, this package allows one to retroactively insert documentation currently contained in .Rd into .R files. Sounds like a promising approach for both learning roxygen and for converting packages currently in development to R packages. Woo hoo. Thanks Yihui!
基于Joshua和Yihui的回答,答案似乎是: roxygen允许根据源.R代码的更改自动更新Rd文件等,并且如果我当前不使用roxygen ,Rd2roxygen可以帮助我迁移.
Based on answers by Joshua and Yihui, the answer appears to be: roxygen allows automatic updating of Rd files etc based on changes in the source .R code, and if I am not using roxygen currently, Rd2roxygen can help me migrate.
推荐答案
Rd2roxygen
旨在帮助打包已困住"原始Rd文件但要切换到roxygen
的开发人员-它可以处理Rd文件并使用roxygen注释更新R脚本.从那时起,您就可以开始享受roxygen
的强大功能了.因此Rd2roxygen
并不是直接的答案,但它可能会帮助您进行过渡.
Rd2roxygen
was designed to help package developers who have been "stuck" in the raw Rd files but want to switch to roxygen
-- it can process Rd files and update the R scripts with roxygen comments. From then on, you can begin to enjoy the power of roxygen
. So Rd2roxygen
is not a direct answer, but it might help you with the transition.
这篇关于有没有一种方法可以自动更新R软件包中的文档?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!