From the terminal command line in its parent directory, but it could be rebuilt every time
```{r setup, include=FALSE}
###--- Update the knitr working directory (R works from the project folder, knitr works in the rmd folder)
dd <- getwd()
knitr::opts_knit$set(root.dir= paste(dd,'/../../'))
###--- Set some knitr defaults for all of the code blocks below.
knitr::opts_chunk$set(warning=FALSE
,error=FALSE
,message=FALSE
,cache=F
,eval=TRUE
,results='asis'
,echo=TRUE
,fig.ext="png"
,cache.path = paste0(dd,'/cache/')
,fig.path = paste0(dd,'/figures/')
)
from pdbentley's answer to https://stackoverflow.com/questions/24585254/working-with-knitr-using-subdirectories
might work if you change the last line to
fig.path = '/dev/null' #Linux
On Windows 10 there seems to be a lot of confusion as to how to do the same thing in the registry, so I can't speculate.