Learn R Programming

wyz.code.rdoc (version 1.1.7)

generateContent: Generate R documentation content

Description

Generate a R documentation atomic piece

Usage

generateContent(content_s, keyword_s_1 = NA, content2_s = NA,
                inline_b_1 = TRUE, useSpace_b_1 = FALSE)

Arguments

content_s

the content to consider

keyword_s_1

a R documentation keyword. See rdocKeywords.

content2_s

a second content, useful with some keywords that require two members

inline_b_1

should the printed result be inline or not ?

useSpace_b_1

when dealing with documentation keywords that requires two members, some may require a space in between to work properly. This parameters allows you to ask for this.

Value

A string, containing one or several lines of text.

Details

Very convenient function, to customize your R documentation output.

Might be used programmatically to generate pieces or full documentation.

See examples below.

References

Refer to Writing R extensions to know more about R documentation requirements.

Examples

Run this code
# NOT RUN {
print(generateContent('a title', 'title'))
print(generateContent('https://neonira.github.io/offensiveProgrammingBook/', 'href',
'Offensive Programming Book'))
print(generateContent('a', 'item', 'description of a', useSpace_b_1 = TRUE))
print(generateContent('a', 'item', 'description of a', useSpace_b_1 = FALSE))
# }

Run the code above in your browser using DataLab