knitr: child document in different directory
问题 I can use the following code for child document if it is in the same directory. <<child-demo, child=knitr-input-child.Rnw, eval=TRUE>>= @ I wonder how to use child document if it is not in the same directory of master document. Thanks in advance for your help and time. 回答1: This can be considered as a bug. Now I have fixed it on GitHub. Note, however, you need to setwd() to the directory of your master document before using knit() , otherwise knit() may not be able to find a child inputdir