produceDocumentationFile: Produce Documentation File

Description Usage Arguments Classification Note Author(s) Examples

View source: R/produceDocumentationFile.R

Description

Use this function to save documentation text into a documentation file.

Usage

1
produceDocumentationFile(filename_s_1, content_s, generationContext_o_1)

Arguments

filename_s_1

the target file name to use

content_s

An unconstrained vector of string values

generationContext_o_1

The generation context object to consider for generation. See GenerationContext.

Classification

STRATUM ▶ LAYER_1

PHASING ▶ BUILD

INTENT ▶ CONTENT_GENERATION

Note

From a end-user perspective, this function should only be used indirectly through a call to produceManualPage function.

Direct call is meaningful when crafting your own manual page builder code/program.

Author(s)

Fabien Gelineau <neonira@gmail.com>

Maintainer: Fabien Gelineau <neonira@gmail.com>

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
fn <- tempfile()
p <- produceDocumentationFile(basename(fn), c(
  generateSection('name', 'alpha'),
  generateSection('alias', 'alpha'),
  generateSection('keyword', 'documentation generation')
),
GenerationContext(dirname(fn)))

p
# $filename
# [1] "/tmp/RtmpSWZq4H/filee3c2700207f.Rd"
#
# $overwritten
# [1] TRUE

readLines(p$filename)
# [1] "\name{alpha}" "\alias{alpha}" "\keyword{documentation generation}"

wyz.code.rdoc documentation built on Oct. 6, 2021, 9:07 a.m.