Rdo_create: Create basic Rd objects

View source: R/Rdutils.R

Rdo_createR Documentation

Create basic Rd objects

Description

Create basic Rd objects with fields title, name and arguments.

Usage

Rdo_create(arguments, title = "Dummy title", name = "dummy name")

Rdo_empty(rdtag)

Arguments

arguments

The argument field of an Rd object

title

the title, a string

name

the name, atring

rdtag

a value for "Rd_tag", a string.

Details

Rdo_create is an auxiliary function used to prepare arguments for a call to Rd_help2txt since the latter works on Rd objects or text but not on Rd sections.

Rdo_empty creates an empty object of class "Rd" if rdtag is missing. If rdtag is supplied the object is a list with attribute "Rd_tag" set to rdtag.

Value

an Rd object or a list with attribute "Rd_tag".

Author(s)

Georgi N. Boshnakov

Examples

require(tools)   # for Rd2txt
a1 <- Rdo_get_args("seq")
a1
Rdo_create(a1)
Rd2txt(Rdo_create(a1))

a2 <- Rdo_get_args("seq", c("from", "to", "by"))
a2
Rdo_create(a2)
Rd2txt(Rdo_create(a2))

Rdo_empty()
class(Rdo_empty())
str(Rdo_empty())

gbRd documentation built on June 22, 2024, 11:34 a.m.