How can I insert side by side png files from my computer into rstudio when creating an html document?
The following works well (plots)
```{r, echo=F
We still lack a good answer to this question if the desired output is a MS Word document (I see that the OP specifically asked for HTML output, but I'm guessing I'm not the only one who came here looking for a solution that works for MS Word docs also).
Here's one method, based on this and this, but the result is not very satisfactory:
library(png)
library(grid)
library(gridExtra)
img1 <- rasterGrob(as.raster(readPNG("path/to/picture1.png")), interpolate = FALSE)
img2 <- rasterGrob(as.raster(readPNG("path/to/picture2.png")), interpolate = FALSE)
grid.arrange(img1, img2, ncol = 2)