I am new here and need some help...

Hi everyone,
I am new to R (and have no programming experience, but need R for Uni) and do not know who to ask for help so here I am.

I have a specific folder on C:, which I set as the Default working directory. However, everytime I open R it creates a folder (named "R") in one of my folders that are synced with OneDrive. And I simply cannot find a setting where I could turn it off. When I delete the folder, R will simply create a new one the next time I open it.

I hope that someone can help me somehow, I do not want to have this folder that is syncing with OneDrive, cause everytime I download a package, it will synchronise with OneDrive, which is a waste of resources. I want to just keep it offline (to also not fill my storage with temporary data)...'

Any ideas?
If so, Thank you!!

I think this directory is where the packages get installed (when you run install.packages()). It is defined by the first result of .libPaths(). The solution is to override that by setting the environment variable R_LIBS_USER (which is used during R startup to define the result of .libPaths()), setting it to a directory that does not get synchronized. You will find practical suggestions here.