HenrikBengtsson / startup

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

startup(debug = TRUE): Report on Rconsole files (specific to Rgui on MS Windows) #129

Closed HenrikBengtsson closed 1 year ago

HenrikBengtsson commented 1 year ago

When running Rgui in MS Windows, the following files are also loaded:

if (!tryLoadRconsole("%s/Rconsole", "R_USER", &gui) &&
    !tryLoadRconsole("%s/etc/Rconsole", "R_HOME", &gui)) {

cf. https://github.com/wch/r-source/blob/e7a21904029917a63b4717b53a173b01eeabcc7b/src/gnuwin32/rui.c#L867-L868.

startup(debug = TRUE) should report also on these.

Comment: Following the source code, it turns out that tryLoadRconsole() returns true if the Rconsole exists and was loaded, otherwise false. This means that the $R_HOME/etc/Rconsole is only loaded if, and only if, $R_USER/Rconsole does not exist.

References: