generateDocumentationFile: Generate R documentation file

Description Usage Arguments Value Note Author(s) References Examples

View source: R/generateDocumentationFile.R

Description

Write documentation file on disk.

Usage

1
2
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.

Note

Should be used when programming your own way to produce R documentation.

As a end-user, no need to use this function. Use generateDocumentationContent instead.

Author(s)

Fabien Gelineau <[email protected]>

Maintainer: Fabien Gelineau <[email protected]>

References

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

Examples

1
2
3
4
5
6
7
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)

wyz.code.rdoc documentation built on Oct. 8, 2019, 9:05 a.m.