Title: | Create Doxygen Documentation for Source Code |
---|---|
Description: | Create 'doxygen' documentation for source code in R packages, and optionally make it accessible as an R vignette. Includes a 'RStudio' Addin to easily trigger the doxygenize process. |
Authors: | Clemens Schmid [cph, aut, cre], Martin Lysy [aut] |
Maintainer: | Clemens Schmid <[email protected]> |
License: | GPL (>=2) |
Version: | 2.0.0 |
Built: | 2024-11-13 06:14:45 UTC |
Source: | https://github.com/mlysy/rdoxygen |
Creates doxygen documentation and optionally wraps it as an R vignette.
doxy(pkg = ".", doxyfile = "inst/doxygen/Doxyfile", options = c(), vignette = FALSE, verbose = TRUE)
doxy(pkg = ".", doxyfile = "inst/doxygen/Doxyfile", options = c(), vignette = FALSE, verbose = TRUE)
pkg |
A string with the path to any subfolder of the R package root
directory. Default: |
doxyfile |
A string with the path to the |
options |
A named vector with new settings. The names represent the tags. A list of options can be found here: http://www.doxygen.nl/manual/config.html. |
vignette |
A boolean. Should a vignette be added with |
verbose |
Logical. If |
This function will first create a Doxyfile
with doxy_init
if it doesn't yet exist. Next, it runs Doxygen
on the Doxyfile
, and if
vignette = TRUE
, creates a vignette allowing the Doxygen documentation to be viewed
from within R with a call to vignette()
. The Doxygen vignette is created with
default options. To modify these options, see doxy_vignette
.
NULL
Changes options in doxygen config files.
doxy_edit(pkg = ".", doxyfile = "inst/doxygen/Doxyfile", options = c())
doxy_edit(pkg = ".", doxyfile = "inst/doxygen/Doxyfile", options = c())
pkg |
A string with the path to any subfolder of the R package root
directory. Default: |
doxyfile |
A string with the path to the |
options |
A named vector with new settings. The names represent the tags. A list of options can be found here: http://www.doxygen.nl/manual/config.html. |
NULL
Creates a Doxygen configuration file and sets a few options:
INPUT = src/ inst/include
OUTPUT_DIRECTORY = inst/doxygen/
GENERATE_LATEX = NO
HIDE_UNDOC_MEMBERS = YES
USE_MATHJAX = YES
PROJECT_NAME = name_of_R_package
doxy_init(pkg = ".", doxyfile = "inst/doxygen/Doxyfile", verbose = TRUE)
doxy_init(pkg = ".", doxyfile = "inst/doxygen/Doxyfile", verbose = TRUE)
pkg |
A string with the path to any subfolder of the R package root
directory. Default: |
doxyfile |
A string with the path to the |
verbose |
Logical. If |
While the package developer is free to change the OUTPUT_DIRECTORY
to wherever they like, the default value above is suggested for compatibility with the
devtools package authoring workflow. See doxy_vignette
for details.
NULL
.
## Not run: doxy_init() ## End(Not run)
## Not run: doxy_init() ## End(Not run)
Creates an R Markdown wrapper for the doxygen documentation, so that it
can be viewed from within R with a call to vignette()
.
doxy_vignette(pkg = ".", index = "html", viname, vientry)
doxy_vignette(pkg = ".", index = "html", viname, vientry)
pkg |
A string with the path to any subfolder of the R package root
directory. Default: |
index |
A string with the path relative to |
viname |
A string giving the name of the |
vientry |
A character string specifying the vignette Index Entry to use. Default: "pkgName C++ library documentation". |
This function creates the file vignettes/viname.Rmd
in the package
root folder, containing the necessary meta-data for viewing the Doxygen HTML documentation
from within R with a call to vignette()
.
NULL
The call to vignette()
will *only* open HTML files stored in the doc
subfolder of an installed package. Therefore, a natural location for the doxygen documentation
(doxydoc) is in inst/doc/doxygen
. However, the latest version of devtools
incontrovertibly deletes inst/doc
during the build/install process. Due to the
ubiquitous usage of devtools among R package developers, the doxydoc is stored here
in inst/doxygen
, and during the build process, moved (or technically, copied and
source added to .Rbuildignore
) via a vignettes/Makefile
. Packages with their
own such Makefile
will not have it overwritten, and developers may view the default
Makefile
provided by rdoxygen with the call
cat(readLines(system.file("sys", "Makefile", package = "rdoxygen")), sep = "\n")