What is the difference betwwen `Rprofile`,`Renviron` and `Rprofile.site`,`Renviron.site`?

The name of the file is .Rprofile rather than Rprofile. I got this code after doing a search in SO for '[r] .rprofile' and finding this answer:Locate the ".Rprofile" file generating default options

file.path(getwd(), ".Rprofile") 
[1] "/Users/davidwinsemius/.Rprofile"

Most OSes will hide "dot-files"/"system files" unless you force them to become visible.

You will find the various files described in the ?Startup help page. The .Renviron file is supposed to describe settings and locations of system resources; from `?Startup

Lines in a site or user environment file should be either comment lines starting with #, or lines of the form name=value. The latter sets the environmental variable name to value, overriding an existing value.

So the key-value pairs will be used to push those pairs to the system environment variable table. Rprofile.site is supposed to contain code that creates starting conditions for everyone on a network, perhaps shared options such as the setting for stringsAsFactors=FALSE,

... and .Rprofile contains code that an individual user sets up and controls, perhaps user defined functions or packages to be loaded at startup.

Tags:

R