Description Usage Arguments Details Value Author(s) References See Also Examples
View source: R/generateMarkup.R
Generate R documentation atomic pieces, managing various parameters to fulfil R documentation requirements.
1 2 3 4 5 | 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_)
|
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 |
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.
A single string
, containing one or several lines of text.
Provided content is processed by function escapeContent
.
Fabien Gelineau <neonira@gmail.com>
Maintainer: Fabien Gelineau <neonira@gmail.com>
Refer to Writing R extensions to know more about R documentation requirements.
Refer to escapeContent
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | # 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}"
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.