Changing home/user directory shortcut in RStudio?

Is there any way to change where the "~" shortcut expands to in RStudio? Alternatively, is there a way to permanently set R's HOME environment to something different than the one it picks up from the system? Much to my frustration, R automatically sets my home directory inside the OneDrive folder in my user directory and I cannot figure out how to change it. I would like to either be able to redirect the "~" shortcut or fix my home directory so that "~" redirects there because the lab I work in uses that shortcut in their code a lot and as I add on to that code I would not like to force everyone else to make changes. Thank you.

Welcome to the forum

Tools -> Global Options -> Basic
set desired hone directory.

1 Like