I wanted to try using knitr::include graphics
(link) in my R-markdown document. I am using it as suggested by this link (using the full path):
---
title: "Sample Document"
output:
word_document
---
```{r pressure, echo=FALSE, fig.cap="A caption", out.width = '100%'}
knitr::include_graphics("Z:/../SEM/semflow.png")
```
This is the picture. I tried installing the png
package and also tried simply using:
```{r}
knitr::include_graphics("Z:/../SEM/semflow.png")
```
The code is accepted by knitr
, which means that it found the file, but it shows up in the Word document like this:
Does anyone have an idea how this could happen?
Related question
A related question (without an answer) can be found here.