Neither R nor RStudio will execute any plot

This issue suddenly happened without any obvious reason. R nor RStudio will execute any type of plot be it ggplot or a simple hist(). Nothing comes up in the plot viewer window and the console continually runs the code until I hit stop and the applications crash. This happens in R and RStudio.

I tried running ggplot code that had run perfectly fine previously. Now, whenever I go to plot it continually runs in the console and nothing shows up in the plot view. It will run until I hit stop and the application crashes. I thought it may be an RStudio issue so I removed it and reinstalled and nothing changed. I attempted to run simple plots (e.g. hist()) and the same issue. I then went to regular R and tried to run hist() and the same thing happened. I deleted and reinstalled both R and RStudio and still the issue persists.

Example code that will not execute a plot:

v <-  c(9,13,21,8,36,22,12,41,31,33,19) 
hist(v)

Read more here: Source link