-
-
Save krlmlr/7235520 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
/cache/ | |
/figure/ | |
/predis-sm.aux | |
/predis-sm.bcf | |
/predis-sm.blg | |
/predis-sm.log | |
/predis-sm.out | |
/predis-sm.pdf | |
/predis-sm.pyg | |
/predis-sm.run.xml | |
/predis-sm.tex |
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
#!/bin/sh | |
set -o errexit | |
set -o nounset | |
set -o noclobber | |
name=predis-sm | |
R --no-save --restore <<'EOF' | |
library(knitr) | |
opts_knit$set(error=TRUE) | |
opts_chunk$set(echo=FALSE, cache=TRUE) | |
if(1) { | |
inline.hook = knit_hooks$get("inline") | |
force(inline.hook) | |
knit_hooks$set(inline=function (x) { | |
inline.hook(x) | |
}) | |
} | |
library(ggplot2) | |
update <- function(stem) { | |
rnw <- paste(stem,"Rnw",sep='.') | |
# if (file.info(rnw)$mtime > file.info(paste(stem,"tex",sep='.'))$mtime) { | |
knit(rnw) | |
# } | |
} | |
update("predis-sm") | |
EOF | |
[ -d gen ] || mkdir gen | |
pdflatex -shell-escape $name | |
biber $name | |
pdflatex -shell-escape $name | |
pdflatex -shell-escape $name | |
pdflatex -shell-escape $name |
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
\documentclass{article} | |
\usepackage[backgroundcolor=yellow,shadow,textwidth=1in]{todonotes} | |
\begin{document} | |
<<cache=FALSE>>= | |
if (length(ls())) rm(list=ls()) # new section | |
opts_chunk$set(fig.path="figure/intro/") | |
@ | |
\begin{figure} | |
<<fig.height=3>>= | |
plot(sin) | |
@ | |
\caption{Empirical response} | |
\end{figure} | |
Much work remains \Sexpr{NA}, but I have already begun to use OpenMx | |
\end{document} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment