Last active
August 29, 2015 14:10
-
-
Save kcha/b0dd3f8b488e4767b882 to your computer and use it in GitHub Desktop.
RMarkdown Makefile - taken from https://github.com/kbroman/knitr_knutshell/blob/gh-pages/assets/Makefile
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
# these examples rely on the R/qtl package, www.rqtl.org | |
# install R/qtl package, within R, by typing install.packages("qtl") | |
all: knitr_example.html knitr_example_asciidoc.html knitr_example.pdf markdown_example.html | |
R_OPTS=--no-save --no-restore --no-init-file --no-site-file # vanilla, but with --environ | |
knitr_example.html: knitr_example.Rmd | |
R ${R_OPTS} -e 'library(knitr);knit2html("knitr_example.Rmd")' | |
knitr_example_asciidoc.html: knitr_example.Rasciidoc | |
R ${R_OPTS} -e 'library(knitr);knit("knitr_example.Rasciidoc")' | |
asciidoc -o knitr_example_asciidoc.html knitr_example.txt | |
knitr_example.pdf: knitr_example.Rnw | |
R ${R_OPTS} -e 'library(knitr);knit("knitr_example.Rnw")' | |
pdflatex knitr_example.tex | |
markdown_example.html: markdown_example.md | |
R ${R_OPTS} -e 'library(markdown);markdownToHTML("markdown_example.md", "markdown_example.html")' | |
clean: | |
rm knitr_example.md knitr_example_asciidoc.txt knitr_example.tex |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment