I've just started using Rstudio with my university studies so please forgive me for this super weird question, or if it has been asked somewhere else!
After I installed Rstudio and opened it for the first time it created a folder called 'R' in my Documents. The R folder contains a few subfolders with nothing in them at this stage, but I'm assuming the program will try and autosave here potentially or place libraries here, idk I'm super new..
Anyway, I don't want to get rid of this folder, however it's clogging my google drive and I wanted to move it into my 'university programs' folder which is a couple of layers deeper in my documents. That way it'll be THERE but it isn't where it is now.
My problem is that whenever I move the folder and then open Rstudio again it makes the same 'R' folder in my Documents and doesn't work from the one I just moved to my uni programs folder where I want it to stay. Is it possible to set a directory so it knows where to find this version the 'R folder' and it doesn't constantly make new copies?
To be clear I'm not talking about the actual program file. But the one that goes Documents > R > win-library > 4.0 > ....
Packages are by default installed per user. This is so that if R is shared between several users, they each can have their own package libraries. If you are the only user on a PC, and R is installed locally, you can change this default folder. Just follow this excellent guide: https://www.accelebrate.com/library/how-to-articles/r-rstudio-library
Note that they say you have to run RStudio as an administrator in order for you to change the library to the R install folder. You do this (in Windows) by right clicking the RStudio icon and choosing: "Run as Administrator".
The guide also explains how to setup other paths, but I think if you just want it to be out of the way, you can just select the R installation folder.
So I went through this guide word for word, and everything went perfectly, until the end!
I'm the only user and have full administrator rights over the pc but when I tried to enter my code to the end of the startup code, it tried to tell me that I didn't have permission to make the changes, is this on the Rstudio side or am I somehow not opening the file as an admin, giving me the right to make changes/save?
You have to open everything that you edit again with admin rights. So if you need to edit a document with word-pad for example, you first have to open wordpad as admin (right click method).
If editing a file in RStudio prevents saving it, open it in word-pad or notepad++ or something as admin and edit / save then.