-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.example
25 lines (18 loc) · 1009 Bytes
/
Makefile.example
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# 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 "rmarkdown::render('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 "rmarkdown::render('markdown_example.md')"
# Note that you could also use
# R ${R_OPTS} -e "markdown::markdownToHTML('markdown_example.md', 'markdown_example.html')"
clean:
rm knitr_example.md knitr_example_asciidoc.txt knitr_example.tex