find.first.R: Returns the path of the first found instance of 'module' in...

Description Usage Arguments Value Examples

View source: R/findfirst.R

Description

A symbol maybe passed instead of a string for readability. If an expression is passed, it must return a string value.

Usage

1
find.first.R(module, character.only = FALSE, warn.not.found = TRUE)

Arguments

module

a string (or symbol) specifying the module to search for existance and readability in the current directory, and if it cannot be found, searches for it in the list of directories specified by module.paths and then through the set of paths with the module using a .R extension, if it was not originally specified.

character.only

a logical value, defaulted to FALSE, that permits an unquoted name to be lrequire-d. Set this to TRUE when passing a variable to lrequire, requiring a quoted string.

warn.not.found

a logical value, defaulted to TRUE, can be set to not display warning messages when module is not found.

Value

A string consisting of the path the module was first found searching through module.paths.

Examples

1
2
3
4
hide.not.found.warnings()  # don't warn on files not foudn by find.first.R()

# Returns the path to the first found module according to module.paths
hello_ex.path <- find.first.R(hello_ex)

Example output



lrequire documentation built on May 1, 2019, 6:49 p.m.