I don't have your code, but i can give you 2 hints:
- Make sure that your file is next to your markdown file in the same directory.
- Try
relative path
of the file.
- Write a short snippet which checks if R can find your file.
I found a sample from this question.
imgAddress="./ADDRESS bla bla/fig1.gif"
if (!file.exists(imgAddress)) {
print("File is not found") }
}
I should cast doubt on the way which you load the image. There are several packages which ,may help you:
library(magick)
tiger <- image_read_svg('http://jeroen.github.io/images/tiger.svg', width = 400)
print(tiger)
OR
earth <- image_read("https://jeroen.github.io/images/earth.gif") %>%
image_scale("200x") %>%
image_quantize(128)
length(earth)
Please read the below link. it will be usefull.
https://cran.r-project.org/web/packages/magick/vignettes/intro.html