Issue creating new projects when I set R_USER in my .Rprofile

On my windows 10 machine, my .Rprofile contains the line

Sys.setenv(R_USER = "C:/Users/qread")

I added this to my .Rprofile so that I could use old scripts from a previous machine without all the links breaking. Therefore the path to my GitHub directory is ~/Documents/GitHub.

However, RStudio does not do the tilde expansion properly when creating new projects. In that dialog box it still "thinks" that ~ represents C:/Users/qread/Documents. Therefore when I try to create a new project and simultaneously initialize a git repository, it creates a new folder C:/Users/qread/GitHub/(name of new project) and then RStudio gives an error when trying to open the project that the system can't find the file specified.

My question is, is RStudio's create project interface incompatible with me manually changing R_USER in my .Rprofile? If not, how do I solve this problem?

For clarification, I can always manually move the project directory later so this isn't a huge problem, but that just seems silly :smiley:

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.