Rmarkdown doesn't create plots

I can't include figures on Rmarkdown. When I knit a RMD file with a plot, it shows this error:
error in png (..., res = dpi, units = "in"): unable to start png() calls: ... in_dir -> plot2dev -> do.call -> -> png
Além disso: warning messages: 1: In png (..., res = dpi, units = "in"): unable to open file 'teste_files/figure-docx/fi-1.png' for writing 2: In png(..., res = dpi, units = "in"): opening device failed

If the RMD doesn't have an image, I can knit and generate HTML, word, or pdf.
This also happens when I try to knit the example!

I updated R and Rstudio two weeks ago.

Can you supply the code that you are using to generate the plot? Have a look at

I used the example code provided by Rmarkdown.

I solved my problem. It was my antivirus, although I don't know why.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.