I am surprised about a strange behavior of RStudio. I have a plot of the size of 27 kB which I want to embed in .Rmd using the following code:
plot = "test.png" par(mar=c(1,1,1,1)) knitr::include_graphics(plot)
The output html is generated without error messages or warnings. However, instead of the plot, a white area is displayed in the output html. More surprisingly, after knitr, the size of the image shrinked to 1 Kb and it shows indeed a white area only. To summarize, instead of embedding the image, RStudio destroyed the image by converting the content to white space.