0

I recently adapted my .Rprofile and was puzzled when RGui did not load the new .Rprofile (RStudio did load it) but instead held on to the old version. After some trial and error I figured out that the .RData-file in the working directory was the reason for that and after deleting it RGui was using the new .Rprofile.

I was wondering why this happens as I was not aware that .RData does save a copy of .Rprofile that dominated the new .Rprofile stored in the working directory. ?Startup suggests that R first searches for .Rprofile and then loads the user workspace from .RData.

gianni
  • 181
  • 1
  • 5
  • I think you need to describe what's in your `.Rprofile` file. I can see that some packages are loaded or some specific options are set when hidden environments are loaded from an `.RData` file. – JBGruber Jan 10 '20 at 15:41
  • The .Rprofile adds a path to .libPaths, loads some packages and sets some options but I don't think it matters here since the only difference between the old and new .Rprofile is that one path is slightly different. – gianni Jan 13 '20 at 16:54

0 Answers0