Learn R Programming

wyz.code.rdoc (version 1.1.7)

generateReference: Generate R documentation reference piece

Description

Allows to generate content to be used in references R documentation part (or elsewhere), from a list.

Usage

generateReference(data_l)

Arguments

data_l

a list with names url, label, comment

Value

A single string.

Details

Generates a R documentation \href entry. The url holds the URL part, the label holds the label part, and the comment if provided, is appended to the result. The resulting string is appended to the string 'Refer to'.

References

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

Examples

Run this code
# NOT RUN {
print(generateReference(list(url = 'https://neonira.github.io/offensiveProgrammingBook/',
                             label = 'Offensive Programming Book')))
# provides following result
# "Refer to \href{https://neonira.github.io/offensiveProgrammingBook/}{Offensive Programming Book}."
# }

Run the code above in your browser using DataLab