Learn R Programming

wyz.code.rdoc (version 1.1.7)

generateDocumentationFile: Generate R documentation file

Description

Write documentation file on disk.

Usage

generateDocumentationFile(filename_s_1, content_s,
                          overwrite_b_1 = FALSE, verbose_b_1 = TRUE)

Arguments

filename_s_1

the file name to write. Might be a relative or absolute file path. Suffix .Rd will be added if missing.

content_s

the content to write into the file, given as a vector of strings.

overwrite_b_1

a boolean, allowing file overwriting when file already exists.

verbose_b_1

a boolean to show a message when file is overwritten.

Value

A list with two entries named filename and overwritten, expressing the file name and the overwritten boolean flag.

References

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

Examples

Run this code
# NOT RUN {
content <- c(
  generateSection('name', 'alpha'),
  generateSection('alias', 'alpha'),
  generateSection('title', 'alpha function'),
  generateSection('description', 'Function alpha allows to ...')
)
generateDocumentationFile(file.path(tempdir(), 'myRdoc'), content, TRUE)
# }

Run the code above in your browser using DataLab