When I try to change the global options it is saying that permission is denied. I did not have this problem on my windows laptop.
This can happen when taking the option to install system wide, rather than for the specific user or when putting into it a system directory that requires administrator privileges to write.
I mean I am the only user on this Mac. I gave RStudio all the privileges to read and write. Even gave the read and write permissions too. Don't know what else to do tbh.
I’ll install on my M1 tonight and get back to you
OK, I used Tools | Global Options | General | R Sessions | Default Directory to change the location from ~ to ~/Desktop, and it works.
The change is written to the file /Users/ME/.config/rstudio/rstudio-prefs.json
where it appears as "initial_working_directory": "~/Desktop",
The relevant permissions are
-rw-r--r-- 1 ME staff 303 Feb 11 01:11 rstudio-prefs.json
drwxr-xr-x 4 ME staff 128 Feb 1 23:52 rstudio
drwxr-xr-x 4 ME staff 128 Feb 1 23:52 .config
The .config
directory in your home directory should have been created with the installation of RStudio
.
If it's missing, use the terminal
[your prompt] mkdir .config
[your prompt] cd .config
[your prompt] mkdir rstudio
[your prompt] ls -la # check directory permissions for rstudio
[your prompt] cd ..
[your prompt] ls -la # check directory permissions for .config
Make a change to global options in RStudio and
[your prompt] cd ~/.config/rstudio
[your prompt] cat rstudio-prefs.json
You should see the changes reflected.
The preview shot is for the RStudio app, not the data it reads or creates.
The permissions to RStudio is showing as denied and when I try to check the rstudio config by typing "cd .." its is not showing up in the list. I tried going into the config with this command "cd ~/.config/rstudio" but its showing as no such file or directory.
That sounds like RStudio didn't install properly. I'd use AppZap to remove it (maybe just deleting RStudio.app is fine, but that doesn't always erase the traces) and then reinstall, being careful to take all the defaults.
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.