使Sweave + RweaveHTML将所有图形放在指定的文件夹中(Make Sweave + RweaveHTML put all graphics in a specified folder)

系统教程 行业动态 更新时间:2024-06-14 16:57:18
使Sweave + RweaveHTML将所有图形放在指定的文件夹中(Make Sweave + RweaveHTML put all graphics in a specified folder)

作为这个问题的一个改进,是否有人知道如何告诉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.

更多推荐

本文发布于:2023-04-12 20:57:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/dzcp/1b19751e6f0931d9a41a4810914eddc1.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:放在   图形   文件   夹中   Sweave

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!