作为这个问题的一个改进,是否有人知道如何告诉Sweave(或者更好的驱动程序)在R2HTML包中使用RweaveHTML驱动程序时将所有图形放入特定目录? 我找不到任何选项:(
As a refinement of this question, does anyone know how to tell Sweave (or better the driver) to put all the graphics in a specific directory when using the RweaveHTML driver from the R2HTML package? I can't find any option for that :(
最满意答案
Sweave响应数字的prefix.string选项。 例如在我最近使用的一个文件中
\SweaveOpts{engine=R,eps=FALSE,echo=TRUE,prefix.string=figures/chart}这导致文件figures/chart-chunkname.pdf ,其中我使用chunkname作为Sweave代码片段中的标识符。 我怀疑同样可能有助于R2HTML,但我没有尝试过这个驱动程序。
Sweave responds to the prefix.string option for figures. E.g. in one recent document I use
\SweaveOpts{engine=R,eps=FALSE,echo=TRUE,prefix.string=figures/chart}which leads to files figures/chart-chunkname.pdf where I use chunkname as the identifier in the Sweave code snippet. I suspect the same may help for R2HTML but I have not tried that driver.
更多推荐
发布评论