R/sourceDir.R

Defines functions sourceDir

# AB: 21/02/2010
# source all the files of a directory
sourceDir <- function(path, trace = TRUE, ...) {
    for (nm in list.files(path, pattern = "\\.[R]$")) {
       if(trace) cat("source:", nm)           
       source(file.path(path, nm), ...)
       if(trace) cat("\n")
    }
 }

Try the RCALI package in your browser

Any scripts or data that you put into this service are public.

RCALI documentation built on Jan. 13, 2023, 5:12 p.m.