如何使用knitr导入本地图像进行降价 [英] How to import local image using knitr for markdown

查看:116
本文介绍了如何使用knitr导入本地图像进行降价的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在本地目录中有一个外部创建的png图像,我想使用knitr将其导入到报告中。最终的目标文件类型是html。当我用R代码创建自己的数字时,我没有任何问题,但我不知道该怎么想是一个简单的问题。

I have an externally created png image in a local directory that I'd like to import to a report using knitr. The ultimate target filetype is html. I have no trouble getting my own figures to appear when I create them with R code, but I'm at a loss what I would have thought was a simpler problem.

虽然我在这,我怎么会导入一个数字,我有一个网址?

While I'm at it, how would I import a figure for which I have a url?

推荐答案

如果你已经有一个本地图像,您可以使用HTML或markdown语法将其包含在文档中。 HTML语法< img src =路径/ to / your / image/ > 降价![title](路径/ to / your / image)

If you already have a local image, you can just use the HTML or markdown syntax to include it in your document. HTML syntax is <img src="path/to/your/image" /> and markdown is ![title](path/to/your/image).

这篇关于如何使用knitr导入本地图像进行降价的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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