用于存储R包小插图中使用的图像的正确文件夹是哪个? [英] Which is the correct folder to store images used in vignettes for R packages ?

查看:87
本文介绍了用于存储R包小插图中使用的图像的正确文件夹是哪个?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为我的R包装写小插图.我想在.Rmd文件中包含一个.jpg图片,该图片将生成pdf小插图.问题是:我应该将该图像存储在哪里?

I am writing a vignette for my R package. I want to include a .jpg image on the .Rmd file that will generate the pdf vignette. The question is: where should I store this image?

我正在使用软件包devtoolsknitr生成小插曲(遵循@hadley书链接).因此,我的包结构中包含文件夹小插图.我应该只在其中包含文件吗?还是我应该将图像包括在'inst/images'内的新文件夹中,如有关小插图中使用的外部数据所建议的那样(也由@hadley推荐:

I am using the packages devtools and knitr to generate vignettes (following the advise from @hadley book link). Therefore, I have the folder vignettes in my package structure. Should I just include the file there? Or should I include the image on a new folder inside 'inst/images', as suggested for external data used in vignettes (also recomended by @hadley: link)?

预先感谢您的任何建议. 干杯

Thanks in advance for any suggestion. Cheers

推荐答案

:

重新制作小插图所需的所有其他文件(例如LaTeX样式 文件,BibTeX输入文件以及任何非由以下人员创建的图形的文件 在小插图中运行代码)必须在小插图源中 目录.

All other files needed to re-make the vignettes (such as LaTeX style files, BibTeX input files and files for any figures not created by running the code in the vignette) must be in the vignette source directory.

这篇关于用于存储R包小插图中使用的图像的正确文件夹是哪个?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆