Re: [R] .Last function in R 4.1.0

2021-06-07 Thread Duncan Murdoch
And to expand a bit: only the site file tries to put objects into the base package. The local .Rprofile file would put them into the global environment. So there's still support for .First and .Last, but it has changed. This abuses things a bit, but appears to work in an Rprofile.site file:

Re: [R] .Last function in R 4.1.0

2021-06-07 Thread Bert Gunter
According to the News file for 4.1.0 -- you should always check there first for such things -- "The base environment and its namespace are now locked (so one can no longer add bindings to these or remove from these)." So the docs do seem to need updating. Bert Gunter "The trouble with having an

[R] .Last function in R 4.1.0

2021-06-07 Thread Paul Louisell
Here's my relevant OS / version info for background: R version 4.1.0 (2021-05-18) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 19043) Here's the problem: I've inserted the following lines *only *into my Rprofile.site file in the etc folder: if(interactive()){ .Last