有没有办法自动更新 R 包中的文档?
几个月前,我使用“package. Skeleton()”生成 .Rd 帮助文件。我编辑了这些文件,还更改了功能,删除了一些功能,添加了其他功能。有没有自动更新Rd文件的功能?
更新
刚刚发布了一个不错的软件包,名为 Rd2roxygen< /a>,作者 Yihui Xie 在他的
顾名思义,该包允许将当前包含在 .Rd 中的文档追溯插入 .R 文件中。对于学习 roxygen 以及将当前开发的包转换为 R 包来说,这听起来是一种很有前景的方法。呜呼。谢谢一辉!
根据 Joshua 和 Yihui 的回答,答案似乎是: roxygen 允许根据源 .R 代码的更改自动更新 Rd 文件等,如果我当前没有使用 roxygen,Rd2roxygen 可以帮助我迁移。
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?
update
A nice package was just released called Rd2roxygen, it is described by the author Yihui Xie on his blog.
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!
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
Rd2roxygen
旨在帮助那些一直“卡在”原始 Rd 文件但想要切换到roxygen
的开发人员——它可以处理 Rd 文件并更新 R 脚本与氧气评论。从那时起,您就可以开始享受roxygen
的力量了。因此,Rd2roxygen
不是直接答案,但它可能会帮助您完成过渡。Rd2roxygen
was designed to help package developers who have been "stuck" in the raw Rd files but want to switch toroxygen
-- it can process Rd files and update the R scripts with roxygen comments. From then on, you can begin to enjoy the power ofroxygen
. SoRd2roxygen
is not a direct answer, but it might help you with the transition.这并没有具体回答您的问题,但您可能对 Roxygen 感兴趣。
This doesn't specifically answer your question, but you may be interested in Roxygen.
不,我不这么认为。
但是您可以尝试为新的或更改的函数重新运行
package.sculpture()
,然后手动合并它。No, I don't think so.
But you could try re-running
package.skeleton()
for new or changed functions and then merge this by hand.