Renviron file loading without opening project

Hi all,

I'm fairly new to some of the more advanced underpinnings of R Studio, so please excuse my ignorance if this is something very simple to deal with. I have searched the web and this forum and haven't found any discussion of this particular issue.

Recently I have started using environment files in many of my R projects to facilitate loading packages, API keys, and the like. So far it has made life much easier, except for this one major issue.

Any R packages (and their dependencies) contained in the project .Renviron file cannot be updated while in a project. The packages need to be detached to update, and whenever R Studio is prompted to restart, it simply restarts within the project, reloads the packages from the environment file, and the update fails again (ad nauseam). Fair enough, that makes sense.

However, even when I close a project, or start a fresh session of R Studio, the app is still loading an environment file from one of my GitHub projects, and I am unable to update packages. From what I've read, R Studio has a process of searching through sequential locations for an environment file and loads the first one it comes across, which seems to be what's happening here.

Does anyone have advice on what to do here? Do I need to create a blank environment file in a specific location or something like that?

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.