Skip to main content


Showing posts from May, 2012

knitr, Slideshows, and Dropbox

I just noticed that Markus Gesmann has a nice post on using RStudio , knitr , Pandoc , and Slidy to create slideshows. After my recent attempt to use deck.rb to turn a Markdown / knitr file into a deck.js presentation I caved in and also decided to go with Pandoc and Slidy . For me, Slidy produced the cleanest slides of the three formats that Pandoc supports. The presentation is here and the source is here . The only thing I really disliked was having to use <br /> or something similar to keep the text from bunching up at the top of the slides, which looked strange when projected onto a screen. You can customise Slidy CSS files, but I haven’t got around to that yet. In this post I don’t want to duplicate what Markus Gesmann has already done. Instead, I wanted to mention two things that I noticed/thought about while making my presentation: The new MathJax syntax implemented in RStudio 0.96.227 doesn’t seem to work with Pandoc. It just renders latex as if it was

Aspirational & Useful: deck.rb with RStudio/knitr & Go2Shell

There has been some interest in the recent release of RStudio 0.96 and especially the ability to use combine its knitr Markdown functionality with Pandoc to integrate R and a variety of different documents types. I just wanted to add two quick things (one mostly aspirational, the other useful) Aspirational: Markdown/Ruby/deck.js I am currently using this combination to put together a presentation based on a recent working paper . Maybe out of procrastination I decided to see if there was any way to use knitr /Markdown to write a deck.js presentation. I generally prefer deck.js to the three Pandoc HTML presentation types ( slidy , S5 , and dzslides ). Deck.js presentations are a pain to write, so it would be great if there was a program like Pandoc that could quickly convert a Markdown file into a deck.js presentation. I discovered that there kind of is. There is a ruby program called deck.rb . The Markdown syntax is really simple and would be familiar to Pandoc users (

Maybe One of the Most Striking Examples of Regulatory Capture, Whaling Edition

This is a rare non- R /my research-based post. From Wikipedia I’ve been reading D. Graham Burnett ’s The Sounding of the Whale: Science and Cetaceans in the Twentieth Century . One particularly interesting piece of information, in this generally very interesting book for anyone interested in whales, science, the history of science, conservation, regulation, international agreements … is that when the early 20th century officials at the British Colonial Office tried to make sure that the (fairly meagre) whaling restrictions around South Georgia Island were being enforced: [the official was given] a brisk lesson in South Georgia realpolitik: the [enforcement officer] ‘occupies two rooms in a cottage owned by [the main whaling company] and boards at the managers mess,’ placing him ‘in a most delicate and difficult position’ when it came time to deliver sanctions; his nearest ally was some 800 miles of rough sea away–and he had no boat.

Dynamic Content with RStudio, Markdown, and Marked.

As Markus Gesmann recently pointed out , the new version of RStudio (0.96) has some really nice features for creating dynamic reports with Yihui Xie ’s knitr . You can integrate not just R and LaTeX , but also R and Markdown (as well as some other formats). If you haven’t used Markdown before, it’s basically a really simplified syntax for writing web content, though it can easily be converted not just to HTML but also LaTeX and other formats with Pandoc . See this post by Yihui Xie for a discussion of how to make HTML presentations with knitr and Pandoc. These programs make it much easier to create HTML presentations that display interactive R output from packages like googleVis (like I did in an earlier post ). I’ve been using RStudio ’s new features in the preview version for a few weeks and it has been really great. It has made creating web content much easier. I’ve even decided to pretty much move my entire introductory data analysis course to the web because I can c