[R] When to use RProfile.site or .Rprofile

Henrik Bengtsson hb at biostat.ucsf.edu
Thu Oct 3 19:47:52 CEST 2013


Unless you're trying to provide your startup settings to multiple
users (typically only sysadms do this), stick with .Rprofile (in your
home directory).  There is no need to have one per working directory,
unless they differ, cf. ?Startup ["...a file called ‘.Rprofile’ is
searched for in the current directory or in the user's home directory
(in that order)."].  Also, RProfile.site resides where R is installed
(e.g. R_HOME/etc/).  Maintaining that one requires updates when the R
version/installation location is updated, whereas the one in you home
directory will always be found regardless of R version.

My $.02

/Henrik

On Thu, Oct 3, 2013 at 9:10 AM,  <jroyrobertson at comcast.net> wrote:
> I would appreciate some advice on what the preferred contents of RProfile.site vs. .Rprofile should be. A .First() function can reside in either one, but is it preferred to place it in .Rprofile? I currently use .First() in .Rprofile files placed in separate directories used for different RStudio projects.
>
> Thank you
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> 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.



More information about the R-help mailing list