Distances on Directed Graphs in R
1LFILE = dists-categorical
2
3all: knith
4#all: knith open
5
6knith: $(LFILE).Rmd
7 echo "rmarkdown::render('$(LFILE).Rmd',output_file='$(LFILE).html')" | R --no-save -q
8
9knitr: $(LFILE).Rmd
10 echo "rmarkdown::render('$(LFILE).Rmd',rmarkdown::md_document(variant='gfm'))" | R --no-save -q
11
12open: $(LFILE).html
13 xdg-open $(LFILE).html &
14
15clean:
16 rm -rf *.html *.png
17
18
19
20fig1: pdflone convone rmone
21
22pdflone: fig1.tex
23 pdflatex fig1.tex
24
25convone: fig1.pdf
26 convert -density 300 fig1.pdf -quality 100 fig1.png
27
28rmone:
29 rm fig1.aux fig1.log fig1.pdf
30
31fig2: pdfltwo convtwo rmtwo
32
33pdfltwo: fig2.tex
34 pdflatex fig2.tex
35
36convtwo: fig2.pdf
37 convert -density 300 fig2.pdf -quality 100 fig2.png
38
39rmtwo:
40 rm fig2.aux fig2.log fig2.pdf
41
42fig3: pdflthree convthree rmthree
43
44pdflthree: fig3.tex
45 pdflatex fig3.tex
46
47convthree: fig3.pdf
48 convert -density 300 fig3.pdf -quality 100 fig3.png
49
50rmthree:
51 rm fig3.aux fig3.log fig3.pdf
52
53figt1: pdflone_t convone_t rmone_t
54
55pdflone_t: times-fig1.tex
56 pdflatex times-fig1.tex
57
58convone_t: times-fig1.pdf
59 convert -density 300 times-fig1.pdf -quality 100 times-fig1.png
60
61rmone_t:
62 rm times-fig1.aux times-fig1.log times-fig1.pdf