Access tag elements from R's Rd file

Share:

Description

A function to extract elements from R's help file.

It is useful, for example, for going through a package and discover who are its authors (useful for me to help me give proper credit in the DESCRIPTION file).

Usage

1
fetch_tag_from_Rd(package, tag = "\\author", ...)

Arguments

package

a character string of the package we are interested in.

tag

a character vector of tag(s) to get from a package's Rd files.

...

not in use.

Value

a character vector with the tag's contant, and the name of the Rd source of the function the tag came from.

Author(s)

Thomas J. Leeper <thosjleeper@gmail.com>

Source

http://stackoverflow.com/questions/17909081/access-elements-from-rs-rd-file

See Also

package_authors

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## Not run: 
fetch_tag_from_Rd("installr", "\\author")
fetch_tag_from_Rd("knitr", "\\author")
fetch_tag_from_Rd("lubridate", "\\author")

fetch_tag_from_Rd("installr", "\\source")

# get all the authors for this package
unique(unname(fetch_tag_from_Rd("installr", "\\author")))

fetch_tag_from_Rd("installr", "\\author")
package_authors("installr")


## End(Not run)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.