setupProject() is the high-level entry point that calls each of the inner setup* helpers in order. The helpers are normally invoked indirectly via setupProject(), but each is exported so users can call it on its own (for diagnosis, partial setup, or post-hoc tweaks).

Details

Order in which setupProject() calls the helpers:

  1. setupOptions() (first pass – before paths)

  2. setupPaths()

  3. setupRestart (internal)

  4. setupFunctions()

  5. setupModules()

  6. setupPackages()

  7. setupSideEffects()

  8. setupOptions() (second pass – after packages)

  9. setupParams()

  10. setupGitIgnore()

Other companions used directly by user code or by setupProject(): setupStudyArea() (resolves a study-area polygon via geodata::gadm()) and setupFiles() (parses local / remote files into named lists).