Skip to content

Instantly share code, notes, and snippets.

@drewhendrickson
Created May 24, 2013 03:35
Show Gist options
  • Select an option

  • Save drewhendrickson/5641128 to your computer and use it in GitHub Desktop.

Select an option

Save drewhendrickson/5641128 to your computer and use it in GitHub Desktop.
Simple bash script for converting an Rmd file to pdf. Requires Rscript (in utils package of R) and pandoc (http://johnmacfarlane.net/pandoc/)
#!/bin/bash
Rscript -e "library(knitr); knit('$1.Rmd')"
pandoc -o $1.pdf $1.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment