Closed jeromyanglim closed 12 years ago
The help for the source function has an example of sourcing a directory:
source
sourceDir <- function(path, trace = TRUE, ...) { for (nm in list.files(path, pattern = "\\.[RrSsQq]$")) { if(trace) cat(nm,":") source(file.path(path, nm), ...) if(trace) cat("\n") } }
The help for the
source
function has an example of sourcing a directory: