Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can Roxygen really document R script (not a package) just like Doxygen does for C++?

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.

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

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?

like image 997
XtrimA Avatar asked May 20 '16 04:05

XtrimA


1 Answers

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.

like image 153
Roman Luštrik Avatar answered Oct 11 '22 13:10

Roman Luštrik