[Rd] Rprofile.site assignments occur in base package (PR#2448)

bert_gunter@merck.com bert_gunter@merck.com
Mon Jan 13 16:23:17 2003


Not sure whether this is a feature or bug -- but it does not appear to be
documented.

R1.6.1 on Windows NT 4.00.1381

Objects assigned in the Rprofile.site file (e.g. foo<-'something') are put
into package:base not .GlobalEnv on startup. Objects assigned in the
.Rprofile file are put into .GlobalEnv. This doesn't seem consistent to me.
The objects exist in base only for the duration of the session -- they are
not written permanently (of course). Anything in the (saved) .GlobalEnv will
persist.

The workaround(?) is trivial: source() in a file with the assignments in the
Rprofile.site file. Assignments in the sourced file are done in .GlobalEnv.

Cheers,
Bert Gunter
Biometrics Research RY 84-16
Merck & Company
P.O. Box 2000
Rahway, NJ 07065-0900
Phone: (732) 594-7765
mailto: bert_gunter@merck.com

"The business of the statistician is to catalyze the scientific learning
process."      -- George E.P. Box





------------------------------------------------------------------------------