Skip to content
Prev 35830 / 63424 Next

R Startup configuration file

Barry Rowlingson wrote:
When I read the ?Startup man page, I find it is too complicated already; 
I don't want to add another kind of file to read.  (Would we have  
separate user and site versions of this new file?  When would it be 
handled?)

However, we could achieve what you are asking for with no changes to 
base R.  One way would be to write a small package to handle options.  
When you want to save a setting, you call a function there that writes 
it to a private file.  Then you manually add a line to your .Rprofile, 
saying something like "myOptionPackage::loadMyOptions()".  This can do 
whatever you want, it only needs to know how to parse the file that your 
package wrote.

Duncan Murdoch