generateMarkup {wyz.code.rdoc} | R Documentation |
Generate R documentation atomic piece
Description
Generate R documentation atomic pieces, managing various parameters to fulfil R documentation requirements.
Usage
generateMarkup(content_s, keyword_s_1 = NA_character_,
content2_s = NA_character_,
inline_b_1 = TRUE, useSpace_b_1 = FALSE,
escapeBraces_b_1 = FALSE,
content3_s = NA_character_)
Arguments
content_s |
a |
keyword_s_1 |
a R documentation keyword. See
|
content2_s |
a |
inline_b_1 |
a single |
useSpace_b_1 |
a single |
escapeBraces_b_1 |
when |
content3_s |
a |
Details
Very convenient function, to customize your R documentation output.
Might be used programmatically to generate pieces or full documentation.
Tested thoroughly with zero, one, two and three contents to cover all the markups of R documentation.
See examples below.
Value
A single string
, containing one or several lines of text.
Provided content is processed by function escapeContent
.
Author(s)
Fabien Gelineau <neonira@gmail.com>
Maintainer: Fabien Gelineau <neonira@gmail.com>
References
Refer to Writing R extensions to know more about R documentation requirements.
See Also
Refer to escapeContent
.
Examples
# 0. zero content example
print(generateMarkup(keyword = 'R'))
# "\\R"
# 1. one content example
print(generateMarkup('a title', 'title'))
# "\\title{a title}"
# 2. Two contents examples
print(generateMarkup('https://neonira.github.io/offensiveProgrammingBook/',
'href', 'Offensive Programming Book'))
# "\\href{https://neonira.github.io/offensiveProgrammingBook/}{Offensive Programming Book}"
print(generateMarkup('a', 'item', 'description of a', useSpace_b_1 = TRUE))
# "\\item{a} {description of a}"
print(generateMarkup('a', 'item', 'description of a', useSpace_b_1 = FALSE))
"\\item{a}{description of a}"
# 3. Three contents example
print(generateMarkup('content_1', 'ifelse', 'content_2', content3_s = 'content_3'))
# "\\ifelse{content_1}{content_2}{content_3}"