yihui/knitr — Issue #25: Image-snippet in minimal example fails in Rstudio
Author: mhermans
Created: 2011-12-01 23:00:26+00:00
State: open

I just installed knitr and tried the included minimal example. The snippet that should produce the image however, fails in a Rstudio session (Win7, R 2.14) with the following error:

|>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> | 86%
boring-plots: fig=TRUE, dev=pdf, width=5, height=5, out.width=.45\linewidth

Error in gzfile(file, "wb") : cannot open the connection
In addition: Warning message:
In gzfile(file, "wb") :
cannot open compressed file 'C:/Users/MaHermans/AppData/Local/RStudio-Desktop/graphics/c4be2257-
bbc2-4c51-8650-42b5f89e36f1.snapshot', probable reason 'No such file or directory'
Graphics error: Error in gzfile(file, "wb") : cannot open the connection

Perhaps Rstudio places images in a different location then knitr expects?