roxygen2md: Convert from Rd to Markdown in roxygen2 comments

Description Usage Arguments Value Examples

Description

Performs various substitutions in all .R files in a package to make use of the Markdown functionality in roxygen2. This function is designed for interactive use, see markdownify() for details on the transformations. Also attempts to enable Markdown support in roxygen2 by adding a field to DESCRIPTION. Carefully examine the results after running this function!

Usage

1
roxygen2md(scope = c("full", "simple", "none"))

Arguments

scope

The scope of transformations: "simple" runs only transformations that shouldn't substantially change the resulting .Rd files, "full" runs all transformations. In larger packages, run "none", double-check and track the changes, and then run "simple" and then "full".

Value

List of changed files, invisibly

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
if (interactive()) {
  # Convert roxygen to Markdown in one run
  roxygen2md()
}

# Alternatively, convert in three steps:
if (interactive()) {
  # 1. Enable Markdown processing
  roxygen2md("none")

  menu("Please examine/commit the changes and press 1 <enter> to continue.")

  # 2. Convert simple markup
  roxygen2md("simple")

  menu("Please examine/commit the changes and press 1 <enter> to continue.")

  # 3. Convert everything, including links
  roxygen2md("full")
}

roxygen2md documentation built on June 17, 2019, 5:05 p.m.