parse_Rdname: Parse the name section of an Rd object

View source: R/inspect.R

parse_RdnameR Documentation

Parse the name section of an Rd object

Description

Parse the name section of an Rd object.

Usage

parse_Rdname(rdo)

Arguments

rdo

an Rd object

Details

The content of section "⁠\name⁠" is extracted. If it contains a hyphen, ‘-’, the part before the hyphen is taken to be the topic (usually a function name), while the part after the hyphen is the type. If the name does not contain hyphens, the type is set to the empty string.

Value

a list with two components:

fname

name of the topic, usually a function

type

type of the topic, such as ⁠"method"⁠

Author(s)

Georgi N. Boshnakov

Examples

u1 <- list_Rd(name = "Dummyname", alias = "Dummyallias1",
              title = "Dummy title", description = "Dummy description",
              Rd_class=TRUE )

parse_Rdname(u1)

u2 <- list_Rd(name = "dummyclass-class", alias = "Dummyclass",
              title = "Class dummyclass",
              description = "Objects and methods for something.",
              Rd_class=TRUE )

parse_Rdname(u2)

GeoBosh/Rdpack documentation built on Nov. 11, 2023, 5:22 p.m.