Skip to content

Instantly share code, notes, and snippets.

@wush978
Created December 4, 2012 06:50
Show Gist options
  • Save wush978/4201332 to your computer and use it in GitHub Desktop.
Save wush978/4201332 to your computer and use it in GitHub Desktop.
Convert Rmd 2 md with knitr
argv <- commandArgs(TRUE)
if (!length(argv)) {
cat("Convert Rmd to md\n")
cat("Usage: <input> <output>\n")
quit("no")
}
if (!require(knitr)) {
stop("knitr is required")
}
opts_knit$set(upload.fun = image_uri, animation.fun = hook_r2swf)
knit(argv[1], argv[2])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment