3

I recently updated R and RStudio and now all ggplots show up on a new pop-up window instead of on the plot pane. I updated R by using the updateR() function from the installr package. I then updated RStudio by going to Help -> Check for Updates. This is the only way I know how to update R and this is the first time I've encountered issues. This is happening on my Windows laptop but when I followed the same steps to update R and RStudio on my Windows work computer everything is working as expected, so only getting this issue on my laptop.

> version
               _                                
platform       x86_64-w64-mingw32               
arch           x86_64                           
os             mingw32                          
crt            ucrt                             
system         x86_64, mingw32                  
status                                          
major          4                                
minor          2.1                              
year           2022                             
month          06                               
day            23                               
svn rev        82513                            
language       R                                
version.string R version 4.2.1 (2022-06-23 ucrt)
nickname       Funny-Looking Kid

When I load ggplot2 -> library(ggplot2) , I get the following warning

Warning message: R graphics engine version 15 is not supported by this
version of RStudio. The Plots tab will be disabled until a newer
version of RStudio is installed.

When plotting a ggplot, a new window named R Graphics: Device 2 (ACTIVE) pops-up with the plot. I would like to have my plots showing on the plots tab/pane instead of on a new window.

Screenshot of what I see when plotting ggplot (Actual figure hidden for privacy purposes)...

Screenshot New Plotting Pop-Up Window

When I go to Help -> Check For Updates in RStudio it says "You're using the newest version of RStudio." I tried re-installing ggplot2 but this did not help. In RStudio, I also checked Tools -> Check for Package Updates... and it seems like I have the latest ggplot2 version.

Is this a known problem with the latest R update (I don't think so since it works fine on my Windows work computer) or did something go wrong when updating? What should I try? I do not know what is the best way to unistall and re-install R (if this is something I should try).

r2evans
  • 141,215
  • 6
  • 77
  • 149
FishyFishies
  • 301
  • 3
  • 14
  • 2
    I would not recommend using `updateR`. You can download the latest version of R from https://cloud.r-project.org/bin/windows/base/. What version of RStudio are you running exactly? The most recent version is 2022.07.0. Look in Help...About RStudio to verify your version number. – MrFlick Jul 30 '22 at 20:27
  • 2
    Try with dev.off() in the console! – TarJae Jul 30 '22 at 20:31
  • 3
    The "Check for updates" action was broken recently when I used it on Linux box. You should say what version comes up from the "About" pane. – IRTFM Jul 30 '22 at 21:10
  • I didnt know I could check the version in the about pane, thanks... It says 2021.09.0 Ghost Orchid Release. Is the best way to update R to re-download it? – FishyFishies Jul 31 '22 at 14:58
  • I tried dev.off() but that didn't help – FishyFishies Jul 31 '22 at 15:01
  • 1
    Yes. You can just install the newest version of RStudio yourself. It will replace the existing one. – MrFlick Jul 31 '22 at 19:25
  • That worked perfectly and fixed the plotting issue. Thank you! I wasn't aware updateR can cause issues. – FishyFishies Aug 01 '22 at 02:54

0 Answers0