Include external figures using relative paths in rmarkdown

How do I include external figures using relative paths?

I start my rmd file with:

knitr::opts_knit$set(root.dir = '/Users/dosc3612/odrive/CUDrive/real-time_interpolation',

and then include:

# Heading 1
some text referring to figure 1. ![Figure 1. a map from qgis](data/gis/fig1alt-location_map2.png)

my rmd file is in /Users/dosc3612/odrive/CUDrive/real-time_interpolation/reports/real-time so my understanding is it will look for figures out of that directory. But based on chunk options help( | I thought I could use child.path to set relative paths in the document but that does not appear to be the case.

“data/gis” is a subfolder in “/Users/dosc3612/odrive/CUDrive/real-time_interpolation”


Hi @sarahjohn.s388,
This is the odrive forum, so I’m afraid I can’t help much with this particular question. Maybe this would be a good place to post your question?!forum/knitr