File Directory pointer is messed up

I just installed R & RStudio.
Here's what my filelist looks like:

The directory for these files is C:\Users\me\Onedrive\Documents

This can't be right. Is there any I can change/control the opening directory?

If you really want to change the default opening directory, go to Tools -> Global Options -> General -> Default working directory (when not in a project) and select the directory you want.

I strongly recommend using R projects so that your directory is wherever the project is. You can learn a bit more here: 8 Workflow: projects | R for Data Science

You may also want to check out the here package which will start the working directory wherever your project or if there is no project where your R script is.

Thanks very much for your recommendation. I have had some success, but like what you've shown here and will try it out.

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.