Rd: Construct an Rd container

Description Usage Arguments Details Value See Also Examples

Description

An Rd container is a list which contains other Rd objects.

Usage

1
2
Rd(..., content = list(...), .check = NA,
  verbose = getOption("Rd::verbose", getOption("verbose", FALSE)))

Arguments

..., content

Content specified in individual or list form. Either may be used but only one. All elements should be unnamed.

.check

Should the content be checked for valid Rd and if options are valid? A value of FALSE indicates no checking, TRUE strict checking and NA convert where possible, with messages and warnings.

verbose

Print informational messages.

Details

An empty Rd vector can be created with a Rd() call. A call to Rd with only one argument will not create a double nested list, but will encapsulate tags and strings. For example, calling Rd(Rd('test')) has the same effect as Rd('test')

A character vector may be passed to Rd where it is collapsed and normalized to a Rd container of Rd string.

Value

Will always return valid Rd in canonical form.

See Also

Other construction: Rd_string_creation, Rd_tag

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## Recreating the first few lines of the `example` help file.
R <- Rd_tag("\\R")
Rd( Rd_name('example'), '\n'
  , Rd_alias('example'), '\n'
  , Rd_title("Run an Examples Section from the Online Help"), '\n'
  , Rd_description( "Run all ", R, " code from the "
                  , Rd_tag("\\bold", "Examples"), " part of \n"
                  , R, "'s online help topic ", Rd_code("topic")
                  , " with possible exceptions \n"
                  , Rd_code("dontrun"), ", "
                  , Rd_code("dontshow"), ", and "
                  , Rd_code("donttest"), ",\n see "
                  , Rd_tag("\\sQuote", "Details"), " below."
                  )
  )

Rd documentation built on May 23, 2019, 9:03 a.m.

Related to Rd in Rd...