Optional
Readonly
apply[
{ }, // no replacement -> still try the original name/path
{ '.*\\.R$': 'main.R' }, // replace all .R files with main.R
{ '\s' : '_' }, // replace all spaces with underscores
{ '\s' : '-', 'oo': 'aa' }, // replace all spaces with dashes and oo with aa
]
Given a source("foo bar.R")
this configuration will search for (in this order):
foo bar.R
(original name)main.R
(replaced with main.R)foo_bar.R
(replaced spaces)foo-bar.R
(replaced spaces and oo)Readonly
dropAllow to drop the first or all parts of the sourced path, if it is relative.
Readonly
ignoresearch for filenames matching in the lowercase
Readonly
infertry to infer the working directory from the main or any script to analyze.
Optional
Readonly
repeatedHow often the same file can be sourced within a single run? Please be aware: in case of cyclic sources this may not reach a fixpoint so give this a sensible limit.
Readonly
searchAdditionally search in these paths
sometimes files may have a different name in the source call (e.g., due to later replacements), with this setting you can provide a list of replacements to apply for each sourced file. Every replacement consists of a record that maps a regex to a replacement string.