Source all R files in a directory at once. Also loads selected libraries. This function can be useful when developing R packages, instead of rebuilding the entire package every time you make a change (which is a more robust way to checking the package works, but is much slower).
Directory containing R files.
File name pattern to search for.
Packages to load.
an R object specifying the environment in which the
expressions are to be evaluated. May also be a list or an integer.
The default baseenv()
corresponds to evaluation in the base
environment. This is probably not what you want; you should
typically supply an explicit envir
argument, see the
‘Note’.
Additional arguments passed to sys.source.
Null
source_all()
#> Sourcing 19 files.