I’ve come across a very useful plugin for WordPress which highlights code in posts using GeSHi called WP-Syntax. This plugin is easy to use and adds highlights simply by putting the appropriate tags around code blocks. For instance, we can make the following R code much more readable by using WP-Syntax.
## Generate 100 standard normal random draws x <- rnorm(100,0,1)
A patch is avaliable which includes R code highlights, something which isn’t available in the default WP-Syntax version.