本文介绍了就像Doxygen在C ++中一样,Roxygen真的可以记录R脚本(不是软件包)吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Roxygen受到C,C ++程序员使用的Doxygen文档系统的启发。我已经使用过Doxygen,只要您有doxygen注释,我发现记录任何程序真的很容易。它还会为函数和类生成调用图。我以为roxygen会以相同的方式工作,但是当我搜索roxygen帮助时,我只找到记录R包的解决方案。

Roxygen is inspired by the Doxygen documentation system that is used by C, C++ programmers. I have used Doxygen and I find it really easy to document any program as long as you have the doxygen comment. It also generate call graphs for functions and classes. I thought roxygen would work the same way but when I search for roxygen help, I only find solution to documenting R packages.

我已经检查了Hadley Wickham的在线,但这并没有描述有关R脚本文档的任何内容。

I have checked Hadley Wickham's online roxygen2 help but that does not describe anything about the R script documentation.

我的脚本有时会变成500-1000行,并且我经常在注释中记录几个功能。我想用graph-viz图生成PDF或HTML文档。 Roxygen能够制作呼叫图和文档独立的R脚本吗?

My scripts sometimes become 500-1000 lines and have several functions which I always document with the comments. I want to generate PDF or HTML documentation with graph-viz diagrams. Is Roxygen capable of making call-graph and document standalone R scripts?

推荐答案

不, roxygen2 仅适用于编写软件包文档。在我看来,您正在使用报告生成工具。您可以为此使用 knitr 。您可以包括代码,注释,文本,MathJax,甚至可以使用LaTeX。它还支持目录和参考。这绝不是功能的详尽列表。由于某些逻辑上的限制,您可以生成pdf和html文档,等等。

No, roxygen2 will work only for writing package documentation. Sounds to me you're after a report generating tool. You can use knitr for that. You can include code, comments, text, MathJax, or even use LaTeX. It also supports table of contents and references. This is by no means an exhaustive list of functionality. With some logical limitations, you can produce pdf and html documents, among others.

这篇关于就像Doxygen在C ++中一样,Roxygen真的可以记录R脚本(不是软件包)吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-24 03:42