Blogging with R: easy way to embed R in a blog post? Blogging with R: easy way to embed R in a blog post? wordpress wordpress

Blogging with R: easy way to embed R in a blog post?


I see that there is a posting on this very subject on the "Learning R" blog today. What a coincidence!

This uses Sweave to create the actual output, along with a Python script called blogpost.py (from Stuart Rackham) to upload the results onto the Wordpress blog. I like that approach because using Sweave means that your blog output could easily be converted into a paper or a presentation (with Beamer), so blogging becomes even more useful in the long run.


You may have to integrate R into your blogging engine, not unlike the MediaWiki extension.

Or, going the other way, you take Rpad and wrap a blog engine around its web-based R interface.


I see you asked this a year ago, and since there has been some updates since (relevant to WordPress blogs), I thought of referencing them.

I wrote two posts on the topic:

  1. For wordpress.com hosted blogs: R syntax highlighting for bloggers on WordPress.com
  2. For wordpress.org self hosted blogs: Highlight the R syntax on your (WordPress) blog using the wp-syntax plugin

p.s: I also published the talk I gave on useR2010 with other tips on blogging about R, but the other the posts linked to are the ones answering your question.

Cheers, Tal