HenrikBengtsson / startup

:wrench: R package: startup - Friendly R Startup Configuration
https://henrikbengtsson.github.io/startup/
163 stars 5 forks source link

Emulate .Renviron search order #8

Closed HenrikBengtsson closed 7 years ago

HenrikBengtsson commented 7 years ago

Emulate .Renviron search order:

  1. normalizePath(Sys.getenv("R_ENVIRON_USER"))
  2. ./.Renviron
  3. ~/.Renviron

Only the first match should be loaded (not all).

In order to emulate this for .Renviron.d/, we should probably search for dirname() of the above path names.

From help("Startup", package = "base").