Scope of .Rprofile, .Renviron files

My apologies if this is addressed elsewhere, I had a quick look at the Guide and searched here.

On RStudio Cloud, the location of my config files (.Rprofile, .Renviron, .gitconfig, etc.) is /home/rstudio-user/, and they seem to be effective for me.

Question: will these files be made available to folks with whom I share my project? It's fine either way, but it will help me prepare collaborators either to create their own files, or to tell them to modify the existing files (and for me not to leave "live" credentials in shared projects).


I don't think they are shared... but let's test it! I put a .Rprofile file in my Cloud/project/ folder. Open this and tell me if you see it:

I'm unsure why your path is home/rstudio-user/ ... that looks familiar though. Possibly the path if your project was set up on an old version?

Hi JD - sorry I have taken so long to respond, one of those days when I get started, then something pops up, continually.

I had a look at your project, yes, your .Rprofile is visible to me, and executes when I start the project ("Hi!"). I think this is a project-based .Rprofile, rather than a user-based .Rprofile. FWIW, I just started using RStudio Cloud yesterday, so I don't think it's a version-issue.

Let me return the favor, by setting up and publicizing a project, but with the .Rprofile in /home/rstudio-user.

I'll post again soon!

Here's the promised link:

It has a .Rprofile set up in /home/rstudio-user/ with a similar greeting.


yep, you are exactly right. Stuff in the home directory does not come along. Only stuff in the project directory. And I totally put my .Rprofile in the project directory. Here's what I see when I open your project:

1 Like

Thanks JD, this is starting to come into focus!

When I look at my user directory on your project, my user-based .Rprofile has not moved with me:

I think I'm starting to build a mental-model of this (I can only hope it's useful):

  • the /home/rstudio-user directory is associated with the combination of the user and the project, not just the user.

I think I have a few more things I'll want to confirm to myself (and report here), but this is a very useful start!

Thanks again!

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.