find.first.R {lrequire}R Documentation

Returns the path of the first found instance of module in module.path.

Description

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

Usage

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

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)

[Package lrequire version 0.1.3 Index]