knitr: child document in different directory

旧城冷巷雨未停 提交于 2019-12-06 10:06:26

问题


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/child.Rnw. Please see if the development version works for you. Thanks!



来源:https://stackoverflow.com/questions/9041589/knitr-child-document-in-different-directory

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!