Learn R Programming

Rd (version 0.2.0)

shortcuts: Convenience Construction Shortcuts.

Description

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

Usage

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

  • Rd_alias: Create an alias tag.

  • Rd_aliases: Create multiple aliases

  • Rd_author: Create author tags

  • Rd_arguments: create an arguments tag

  • Rd_code: Create a code tag.

  • Rd_concept: Create a 'concept' tag.

  • Rd_concepts: Create multiple concepts.

  • Rd_description: Create a description tag.

  • Rd_enumerate: Create an enumerated list.

  • Rd_examples: Create an examples tag.

  • Rd_item: Create an item tag.

  • Rd_itemize: Create an itemized list.

  • Rd_keyword: Create a keyword tag.

  • Rd_keywords: Create multiple keyword tags.

  • Rd_name: Create a name tag.

  • Rd_title: Create a title tag.

  • Rd_usage: Create a usage tag.

  • Rd_value: Create a value tag section.

Examples

Run this code
# NOT RUN {
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')
# }

Run the code above in your browser using DataLab