macos – R Studio Freezes when plotting

I recently started having an issue with plotting in R Studio, where R Studio will hang when running plot code. This happens when creating even very basic plots in base R and in ggplot2. For example, when I run the following line:

data(mtcars)
plot(mtcars$mpg)

R Studio freezes (forever? for at least 15 minutes…I haven’t waited longer because I know it should only take a few seconds to generate the plot) and I have to force quit the program. I’ve discovered that if I use pdf to directly save a plot to file from R Studio then the issue is avoided. The problem seems to occur only when trying to render the plot interactively so I can view it inside of R studio. I’m running R 4.2.3-arm64 and RStudio 2023.03.0-386 on a Macbook Pro (M1 chip) with the Monterey v12.2.1 OS.

I’ve seen other posts (like this) that describe a similar (same?) problem, and that manually installing Arial font solved the problem. I’ve also tried this, but it hasn’t resolved the issue (though maybe my approach was wrong?). Has anyone else had this problem?

Read more here: Source link