I am running R version 4.1.3 (2022-03-10) -- "One Push-Up" on Rstudio "Prairie Trillium" Release (8aaa5d47, 2022-03-17) for macOS. My machine is MacBook Air (M1, 2020).
Today my plotting tools such as plot() and ggplot() stopped working - it runs forever and no output is given. I have to terminate the R session to get out of it. I have tried re-installing Rstudio, R, as well as update all packages, resetting my PRAM, etc... but nothing works.
Have you tried in RStudio to run updates for all packages, and check if all of them will update with no errors (including dependencies )? Sometimes this might be the issue. Tools -> 'Check for package updates'
I know that some packages like Rcpp can cause plotting issues when not using the latest version.
Also if a package fails because of a dependency failure (you can get that from the error message), install the dependencies manually as well.
This is a long shot but it wouldn't heart to try reinstalling/updating XQuartz in your system and resetting RStudios state. I guess since you are using a native aarch64 version of R you also need to use an aarch64 version of XQuartz so check on that.
Thank you for the suggestion! I tried that but it didn't work still.
By the way I managed to solve my issue: I contacted Apple support and they recommended me to reboot in safe mode. It worked after that, and even after reboot normally. It could have been another app interfering with R. Rstudio also worked on a test user account I made on the same computer.