Extract the descriptions of one or more arguments of a function

Share:

Description

Extract help descriptions of one or more arguments of a function and return them as a string.

Usage

1
Rdo_args2txt(rdo, arg, title = "Hhh", name = "Aa", type = "text")

Arguments

rdo

the documentation for the topic, typically an Rd object but may be anything that Rd_fun accepts: Rd object, name of a function, or the value returned by help.

arg

name(s) of argument(s) to describe, a character vector, see also Details section

title

Title, a string

name

name, a string

type

type of the help, defaults to "text"

Details

The title and name fields are there, since descriptions of arguments usually do not use the same header as the description of the corresponding function.

The current defaults show that this is still not finished.

Value

A string (character vector of length one).

Author(s)

Georgi N. Boshnakov

See Also

Rdo_args2txt_list

Examples

1
2
3
# ?seq
cat(Rdo_args2txt("seq", c("by", "...")))
cat(Rdo_args2txt("seq", c("from", "by")))