Optional Readonlyapply[
{ }, // 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)faa-bar.R (replaced spaces and oo)ReadonlydropAllow to drop the first or all parts of the sourced path, if it is relative.
Readonlyignoresearch for filenames matching in the lowercase
Readonlyinfertry to infer the working directory from the main or any script to analyze.
Optional ReadonlyrepeatedHow 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.
ReadonlysearchAdditionally 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.