Learn R Programming

FastUtils (version 0.2.1)

getPkgKeywords: Get Keywords from R Package Documentation

Description

[Experimental]

This function retrieves keywords from all package documentation files located in the /man directory of the specified R package. It can return a unique list of keywords or a frequency distribution of these keywords as a table object, sorted by the keys.

Note that the "internal" keyword is ignored.

Usage

getPkgKeywords(pkg = ".", asDistribution = FALSE)

Value

If asDistribution is FALSE, a sorted character vector of unique keywords is returned. If asDistribution is TRUE, a table of keywords and their frequencies is returned. If no keywords were detected, returns a character of length 0.

Arguments

pkg

The path to the R package directory.

asDistribution

Logical; if FALSE, returns a character vector of unique keywords. If TRUE, returns a table with the frequency of each keyword.

Examples

Run this code
getPkgKeywords()
getPkgKeywords(asDistribution = TRUE)

Run the code above in your browser using DataLab