Learn R Programming

Rdpack (version 0.4-4)

Rdo_collect_aliases: Collect aliases in an Rd object

Description

Collect aliases in an Rd object

Usage

Rdo_collect_aliases(rdo)

Arguments

rdo
an Rd object

Value

  • a named character vector

Details

Rdo_collect_aliases finds all aliases in rdo and returns them as a named character vector. The name of an alias is usually the empty string, "", but it may also be "windows" or "unix" if the alias is wrapped in a #ifdef directive with the corresponding first argument.

Examples

Run this code
# this needs "timezones.Rd".
#
# infile <- file.path(R.home(), "src/library/base/man/timezones.Rd")
# rd <- parse_Rd(infile)
#
# # this contains an element windows = "TZDIR"
# Rdo_collect_aliases(rd)
#
# # this does not contain "TZDIR"
# sapply(rd[which(tools:::RdTags(rd)=="\\alias")], as.character)

Run the code above in your browser using DataLab