HenrikBengtsson / startup

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

Make the set of default packages attached by R and Rscript the same(?) #44

Closed HenrikBengtsson closed 6 years ago

HenrikBengtsson commented 6 years ago

Issue

Except for experienced R users, the following is often a surprising finding:

$ Rscript -e "loadedNamespaces()"
[1] "compiler"  "graphics"  "tools"     "utils"     "grDevices" "stats"     "datasets"  "base"     

$ R --quiet -e "loadedNamespaces()"
> loadedNamespaces()
[1] "compiler"  "graphics"  "tools"     "utils"     "grDevices" "stats"     "datasets"  "methods"   "base"     

The above is with env var R_DEFAULT_PACKAGES not set/being empty.

Idea

Is any of this a good idea?

HenrikBengtsson commented 6 years ago

In R-devel, Rscript will attach the same default packages as R (see https://github.com/wch/r-source/commit/c30ffef956b7fed993cbbd15feeb92313c3b89fa).

Skipping...