Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Rprofile is executed multiple times because it is executed every time a new R session is started or a new Rscript is run. This can happen when you open a new terminal window, run R from an IDE, or call R from another programming language. Each time a new session is started, R looks for and loads the .Rprofile file in the current working directory or in your home directory. Therefore, if you have multiple R sessions open at the same time, each session will execute the .Rprofile file.