List functions file exports, experimental, and dependent upon the R file using roxygen2 style '@exports'. Any .R files that do not use roxygen2 comments will return no information.
Arguments
- grep_string
characterpassed togrep_functions()with default values except where provided via '...' arguments.- debug
logicaldefault FALSE, whether to print debug information to illustrate the processing.- ...
all arguments are passed to
grep_functions()
Value
list named by matching functions files, each
with a character vector of the matching function or exported
object in the .R file.
Details
The process looks for any break in roxygen2 comments in an R file. Specific steps are described:
It splits the lines of each file at the point where a non-roxygen2 line is immediately followed by a roxygen2 line.
Within each block, it confirms that there is line that begins with:
#' @export. If there is no such line, the block is ignored.Within remaining blocks, it looks for the first non-roxygen2 line that contains an alphabetic character, which also does not have a '#' occurring before the alphabetic character. It returns that one line as the "exported object" for that block.
An example of a simple roxygen2 style R function is shown below:
#' Function Name
#'
#' @export
function_name <- function
(argument1, argument2, ...)
{
# function code
}
#' Another Function Name
#'
#' @export
another_function <- function
(argument1, argument2, ...)
{
# function code
}
#' Data object
#' @docType data
"Object_name"In the example above, the results would be:
See also
Other jamsession functions:
grep_functions(),
refresh_functions()