Learn R Programming

Rd2md (version 1.0.0)

rd_str_to_md: Translate an Rd string to markdown

Description

Note that this will always end in one newline \n.

Usage

rd_str_to_md(x, fragment = TRUE, ...)

Arguments

x

Rd string. Backslashes must be double-escaped ("\\").

fragment

logical indicating whether this represents a complete Rd file

...

additional arguments for as_markdown

Examples

Run this code
rd_str_to_md("a\n%b\nc")

rd_str_to_md("a & b")

rd_str_to_md("\\strong{\\emph{x}}")

rd_str_to_md("\\enumerate{\\item test 1\n\n\\item test 2}")
rd_str_to_md("wrapped \\itemize{\\item test 1\n\\item test 2} in text")

Run the code above in your browser using DataLab