Whenever I run plot(...), R responds as:
Error in gzfile(file, "wb") : cannot open the connection
In addition: Warning message:
In gzfile(file, "wb") :
cannot open compressed file 'C:/Users/??a??/AppData/Local/Temp/RtmpUlr2r0/rs-graphics-33489ef5-2350-404d-b2ce-2c0e0670cc02/ee54ebe5-5bda-4db2-9707-f36324c7df68.snapshot', probable reason 'Invalid argument'
Graphics error: Plot rendering error
looked into the directory, and there were no files existing. How can I fix this problem??
Thanks for the bug report -- indeed, RStudio has trouble with its graphics device for Windows users who have non-ASCII characters in their username. This occurs because the temporary directory (where RStudio attempts to write its plots) typically resides as a subdirectory of the user's home folder, and because that full path contains non-ASCII characters, we run into this issue.
AFAIK the best workaround is to modify the temporary directory to point to a directory outside your home directory, e.g. you could set an environment variable: