get_pkg_docs {toscutil} | R Documentation |
Get Documented Functions in a Package
Description
Lists all documented functions in a package together with some of their documentation elements as raw text. Only works for installed packages.
Usage
get_pkg_docs(pkg = NULL, unload = TRUE, reload = TRUE)
Arguments
pkg |
The package name. If NULL, the package name is inferred from the DESCRIPTION file in the current directory or any parent directory. If no DESCRIPTION file is found, the function stops with an error message. |
unload |
Whether to unload a potential currently developed package using |
reload |
Whether to reload the package using |
Value
Returns a dataframe with columns title
, description
, value
, examples
and rows corresponding to the documented functions in the package.
Examples
df <- get_pkg_docs("tools")
nchars <- as.data.frame(apply(df, 2, function(col) sapply(col, nchar)))
head(nchars)