This function lists R functions found in an R package. It can inspect the
loaded namespace for exported and non-exported functions and, if a package
source path is available, scan .R files in R/.
Value
A tibble with one row per found R function and columns name,
title, exported, and signature. The {tibble} package needs to be
installed.
Details
include_namespace = TRUE inspects the package namespace with
asNamespace(). This works for installed packages and returns the R
functions that are actually available after the package is loaded, including
internal functions.
include_source = TRUE scans the package source files under R/. This is
useful when pkg points to a package source directory, for example while
developing a package before it is installed. The scan finds all functions
that are assigned to a name, which includes functions that are defined
inside of other functions and named function arguments (e.g., the methods
in the definition of an R6 class). If both options are TRUE, the
result is combined and duplicate function names are removed.
The title column is read from Rd documentation aliases. It is NA when no
matching Rd documentation entry is available for a function.
