parseRd: Parse R documentation

View source: R/parseRd.R

parseRdR Documentation

Parse R documentation

Description

Modified version of tools:::.Rd_get_metadata() that keeps whitespace and returns character instead of matrix.

Usage

parseRd(object, tag)

rdTags(object)

Arguments

object

Rd. R documentation, returned from tools::Rd_db().

tag

character(1). Desired metadata type.

These types are supported:

  • title.

  • description.

  • usage.

  • arguments.

  • value.

  • references.

  • seealso.

  • examples.

Functions

  • rdTags(): Modified version of the unexported tools:::RdTags() function.

Note

Updated 2023-09-25.

See Also

  • tools::Rd_db().

Examples

db <- tools::Rd_db("base")
head(names(db))
rd <- db[["nrow.Rd"]]
print(rdTags(rd))
examples <- parseRd(rd, tag = "examples")
print(examples)

acidgenomics/bb8 documentation built on Feb. 1, 2024, 11:38 a.m.