Introduction to Rd2md

Reference Manual To PDF

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.

Reference Manual To Markdown

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"

From Source

The prerequisites are:

To 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.

From Binary

The prerequisites are:

To 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!



Try the Rd2md package in your browser

Any scripts or data that you put into this service are public.

Rd2md documentation built on Feb. 2, 2021, 1:07 a.m.