```{r}
knitr::include_graphics(path = \"~/Desktop/R/Files/apple.jpg/\")
```
The above code chunk works fine. However, when I create a for
This is a known issue knitr include_graphics doesn't work in loop #1260.
A workaround is to generate paths to images within a for loop and cat them. To show final result result = "asis" is required.
```{r, results = "asis"}
fruits <- c("apple", "banana", "grape")
for(i in fruits) {
cat(paste0(""), "\n")
}
```
Here each iteration generates markdown path to graphics (eg, "")