sourceDir {Smisc} | R Documentation |
Sources all files with '.R' or '.r' extensions in a directory using a try-catch for each file
sourceDir(directory, recursive = FALSE, tryCatch = TRUE, ...)
directory |
Character string indicating the path of the directory containing the R files to be sourced. |
recursive |
|
tryCatch |
if |
... |
Additional arguments to |
In addition to sourcing files for general use, this function is also useful in package development to verify there are no syntax errors prior to building and compilation.
Invisibly returns a character vector containing the files that were identified for sourcing. Also prints a message indicating whether each file was sourced correctly or not.
Landon Sego