Created
January 21, 2016 23:52
-
-
Save wckdouglas/64160636e3aed3971437 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env Rscript | |
| args = commandArgs(trailingOnly=TRUE) | |
| if (length(args)<1) { | |
| stop("A Rmarkdown file has to be specified\n", call.=FALSE) | |
| } else if (length(args)>0) { | |
| # default output file | |
| markdownFile = args[1] | |
| for (markdownFile in args){ | |
| rmarkdown::render(markdownFile) | |
| } | |
| } | |
| message('Rendered ',length(args),' files') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
usage: ./renderRMD.R <1.Rmd file> <2.Rmd file> ...