From @tp @end|ng |rom p|@kor@k|@com  Thu Aug 12 21:19:44 2021
From: @tp @end|ng |rom p|@kor@k|@com (Andrew Piskorski)
Date: Thu, 12 Aug 2021 15:19:44 -0400
Subject: [Rd] Rprofile.site function or variable definitions break with R 4.1
Message-ID: <YRV0UJKvLRRuqrNr@piskorski.com>

With R 4.1, it seems you can no longer do much in your "Rprofile.site"
file.  Attempting to define any functions or set any variables there
gives errors like these:

  Error: cannot add binding of 'my_function_name' to the base environment
  Error: cannot add binding of 'my_variable_name' to the base environment

Presumably that's because of this change in R 4.1.0:

  https://cran.r-project.org/doc/manuals/r-patched/NEWS.html
  CHANGES IN R 4.1.0
  The base environment and its namespace are now locked (so one can no
  longer add bindings to these or remove from these).

Ok, but what's the recommended way to actually USE Rprofile.site now?
Should I move all my local configuration into a special package, and
do nothing in Rprofile.site except require() that package?

Thanks for your help and advice!

-- 
Andrew Piskorski <atp at piskorski.com>



[Rd] Rprofile.site function or variable definitions break with R 4.1
Andrew Piskorski