The Reference Manual of a package exported as PDF is a terminal command shipped with R.
R CMD Rd2pdf
However, pdf versions are quite static and nothing can really be done with it.
The single .Rd files are well structured and can easily parsed to .md files. Thanks to jbryer to publish the relevant code.
These base functionalities were used (and changed/extended) to replicate a Reference Manual in markdown format.
The main functionality of this package is to create the reference manual in markdown format.
However, packages can be available in either source format (from development) or as binary packages (from libraries). This package shall extract from both possible sources the documentation files and create the reference manual.
The output file will have the name following the naming convention:
"Reference_manual_" + PACKAGE_NAME + ".md"
The prerequisites are:
man
directory with .Rd
files is availableTo create the reference manual from the package source, use:
ReferenceManual(pkg = "Rd2md", outdir = getwd())
For the pkg
variable, provide the path of the source code of the
package and the outdir
can be any available directory path. Note that the
source code path can also be relative from the current working directory.
The prerequisites are:
help
directory with .rdb
file is availableTo create the reference manual from the package binaries, use:
ReferenceManual(pkg = "Rd2md", outdir = getwd())
In this situation, the pkg
variable should be given as the package name only,
without any path.
Remark: If, in the current working directory, there is a directory with the same name as the package, it will try to read from that folder!