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=function(){ timestamp(stamp=date(), prefix = "##------ ", suffix = " ------##") savehistory() } } This is a basic .Last function to automatically insert a timestamp into the history and save it at the end of an interactive R session. Prior to R 4.1.0, I'd never received an error from these lines. But in version 4.1.0 on startup, I get this error: Error: cannot add binding of '.Last' to the base environment
And (as expected given the error) the .Last function is not in the workspace: > .Last Error: object '.Last' not found The same thing happens when I start up the 32-bit version. Section 10.8 (pg. 54) of *R-intro.pdf *still has the documentation for .First and .Last, and shows examples where you place the function definitions in the Rprofile.site file, as well as other locations. *fullrefman.pdf *also has documentation for these functions. So my question: - Is this a bug? Or does R not support .First / .Last anymore, and the documents just need updating? Thanks for your help with this, Paul Louisell [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.