Sorry it took me some times to find it, it was simply written at the very bottom of the documentation for quartz.
To permanently change the default settings, you just need to include a line in your .Rprofile :
For a Mac solution :
setHook(packageEvent("grDevices", "onLoad"),
function(...) grDevices::quartz.options(width = 6, height = 6))
You can then modify the default 7x7 width and height to whatever will suit your screen best.
For a Windows solution :
setHook(packageEvent("grDevices", "onLoad"),
function(...) grDevices::windows.options(width = 6, height = 6))
For a X-window system solution :
setHook(packageEvent("grDevices", "onLoad"),
function(...) grDevices::X11.options(width = 6, height = 6))
As for the .Rprofile file, it should be located in your start-up working directory.
If it doesn't exist, you can create a new one with your normal text editor but be sure to save it as .Rprofile (note the .) not as a .txt file.
You can also create it directly from RStudio :
- New File -> Text File
- write the code above inside it
- Save it with the name .RProfile
- quit and restart Rstudio
(or quit and restart R if you're working from the command line)
Note also that R will look for this file first in the current working directory, then in the user's home directory.