This function sources all R scripts from a specified directory. It recursively searches for files with extensions .R, .r, .S, .s, .Q, and .q and sources them into the current environment.

sourceDir(path, trace = TRUE, ...)

Arguments

path

A character string specifying the path to the directory containing the R scripts.

trace

A logical value indicating whether to print the names of the files being sourced. Default is TRUE.

...

Additional arguments to be passed to the source function.

Value

Invisible NULL. This function is called for its side effects.