sourceDir: Allows users to source all .R files in a given directory

View source: R/sourceDir.R

sourceDirR Documentation

Allows users to source all .R files in a given directory

Description

Enables convenient sourcing of multiple .R files simultaneously. Optionally, sourcing can occur recursively in subdirectories.

Usage

sourceDir(dirPath_v, recurse_v = TRUE, verbose_v = F)

Arguments

dirPath_v

a vector of strings, each corresponding to a directory containing .R files you would like sourced

recurse_v

a boolean allowing the user to specify whether the sourcing should dive into subdirectories. Unlike list.files(), the default is true

verbose_v

a boolean determining if sourced files should be printed.

Value

The list of full paths to .R scripts being sourced

Examples

sourceDir(dirPath_v=c("/path/to/UtilityFunctions", "/path/to/AbundanceFunctions"))

weshorton/wrh.rUtils documentation built on Oct. 28, 2024, 7:24 a.m.