我想发布这样的基本博客文章:(博客文章示例) http://rpubs.com/hbat/6531使用我的 R markdown 文件。
但我想在 Wordpress(而不是 wordpress.com)中发布它。
- 最有希望的解决方案似乎是怡辉的功能 http://yihui.name/knitr/demo/wordpress/。我试过
但遇到了很多错误并停止尝试。我使用的是Windows,看来Yihui的knit2wp功能在Linux上运行稳定。 (我从他页面的评论之一中扣除了这一点)
- 以下帖子也没有帮助:this http://wkmor1.wordpress.com/2012/07/01/rchievement-of-the-day-3-bloggin-from-r-14/, this https://stackoverflow.com/questions/14660969/publishing-from-rknitr-to-wordpress.
- 我尝试在 GitHub 上发布我的 markdown,例如(this https://gist.github.com/jeromyanglim/2716336) 作为
中提到的杰罗姆·安格利姆 (Jerom Anglim) 的博客文章 http://jeromyanglim.blogspot.com/2012/05/getting-started-with-r-markdown-knitr.html(顺便说一句,信息非常丰富的博客文章)。无法弄清楚如何将 GitHub 文件嵌入到 Wordpress 中。
- 我考虑将我的整个博客移至 Jekyll,因为一个很好的例子 http://jason.bryer.org/posts/2012-12-10/Markdown_Jekyll_R_for_Blogging.html, 但它
改变整个博客结构似乎非常令人畏惧。
这些解决方案都不适合我。我放弃。复制粘贴代码和格式化的效率非常低。我无法正确对齐我的 r 输出。
还有其他我没有偶然发现并可能解决(或缓解)我的问题的方法吗?
预先感谢您的任何回复。
您是否尝试过“Pretty R 语法荧光笔”(http://www.inside-r.org/pretty-r/tool http://www.inside-r.org/pretty-r/tool)?在您开始使用其他功能之前,这可能是一个很好的临时解决方案。
这段代码:
y <- 1:10
plot(y)
变成这样:
`<div style="overflow:auto;"><div class="geshifilter"><pre class="r geshifilter-R" style="font-family:monospace;">y <span style=""><-</span> <span style="color: #cc66cc;">1</span><span style="">:</span><span style="color: #cc66cc;">10</span>
<a href="http://inside-r.org/r-doc/graphics/plot"><span style="color: #003399; font-weight: bold;">plot</span></a><span style="color: #009900;">(</span>y<span style="color: #009900;">)</span></pre></div></div><p><a href="http://www.inside-r.org/pretty-r" title="Created by Pretty R at inside-R.org">Created by Pretty R at inside-R.org</a></p>`
当嵌入到你的 html 中时,显示如下:
y <- 1:10
plot http://inside-r.org/r-doc/graphics/plot(y)
由 Pretty R 在 inside-R.org 创建 http://www.inside-r.org/pretty-r
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)