shortcuts: Convenience Construction Shortcuts.

Description Usage Arguments Functions Examples

Description

These functions are provided to construct Rd structure. In some cases additional compliance checks are included.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
Rd_alias(alias)

Rd_aliases(aliases)

Rd_author(author)

Rd_arguments(..., items = list(...), indent = getOption("Rd::indent",
  TRUE), indent.with = getOption("Rd::indent.with", "  "))

Rd_code(code)

Rd_concept(concept)

Rd_concepts(concepts)

Rd_description(..., content = Rd(...))

Rd_enumerate(..., items = list(...), indent = getOption("Rd::indent",
  TRUE), indent.with = getOption("Rd::indent.with", "  "))

Rd_examples(..., content = list(...))

Rd_item(item, description = NULL)

Rd_itemize(..., items = list(...), indent = getOption("Rd::indent",
  TRUE), indent.with = getOption("Rd::indent.with", "  "))

Rd_keyword(key, .check = TRUE)

Rd_keywords(keys, .check = TRUE)

Rd_name(name)

Rd_title(title)

Rd_usage(..., usages = list(...))

Rd_value(value)

Arguments

alias

an alias as a plain string.

aliases

a character vector, each element a separate alias.

author

a string, a person object, or another Rd object.

..., content

Rd elements to be contained in the tag.

items

arguments each should be an 'item' tag, newlines to separate items are added automatically.

indent

indent content

indent.with

string to use for indent.

code

a string to be converted to RCODE then wrapped in the 'code' tag.

concept

the concept name, as a plain string.

concepts

a vector of concepts each to be put in a concept tag.

item

the item text

description

an optional description that if provided changes the 'item' tag into a two parameter, rather than a single item tag followed by the item text.

key

A string denoting a valid Rd keyword.

.check

perform validity checks?

keys

A character vector denoting valid Rd keywords.

name

A string for a name of the Rd document.

title

A string giving the title.

usages

lines of usage, all should be bare strings or RCODE strings.

value

The return value, must be a correctly formatted Rd object.

Functions

Examples

1
2
3
4
5
6
7
8
9
Rd_enumerate(Rd_item("first"), Rd_item("second"))
Rd_enumerate( Rd_item("first", "comes before second.")
            , Rd_item("second", "comes after first."))
Rd_item("an item")
Rd_item('a', 'the first letter of the alphabet.')
Rd_itemize(Rd_item("first"), Rd_item("second"))
Rd_itemize( Rd_item("first", "comes before second.")
          , Rd_item("second", "comes after first."))
Rd_keyword('documentation')

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

Related to shortcuts in Rd...