Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/83.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
R 是否更改降价渲染器的行为?_R_Markdown - Fatal编程技术网

R 是否更改降价渲染器的行为?

R 是否更改降价渲染器的行为?,r,markdown,R,Markdown,默认情况下,markdown包呈现如下图像 > library(markdown) > txt <- "![my caption](/img/my_image.png)" > res <- renderMarkdown(text=txt); res [1] "<p><img src=\"/img/my_image.png\" alt=\"my caption\"/></p>\n" >库(降价) >txt res我建议使用多重标记

默认情况下,
markdown
包呈现如下图像

> library(markdown)
> txt <- "![my caption](/img/my_image.png)"
> res <- renderMarkdown(text=txt); res
[1] "<p><img src=\"/img/my_image.png\" alt=\"my caption\"/></p>\n"
>库(降价)

>txt res我建议使用多重标记

$ cat test.txt 
![my caption](/img/my_image.png)

$ multimarkdown test.txt
<figure>
<img src="/img/my_image.png" alt="my caption" />
<figcaption>my caption</figcaption>
</figure>
$cat test.txt
![我的标题](/img/my_image.png)
$multimarkdown test.txt
我的标题

它超出了R,但编写某种包装应该很容易。而且它速度快,支持许多其他功能。我个人更喜欢它。它还支持引用数字:

您是否尝试过“knitr”软件包?它可以呈现markdown+R代码(在同一文件中)。使用选项fig.cap='my caption'时,我总是在图像下方获取文本。这是一个选项,我仍在尝试避免
pandoc
,也许我不应该。或者只是向HTML文件添加一些JavaScript,以便在客户端进行转换。