Created
November 4, 2017 04:24
-
-
Save jeromyanglim/79d3f2202df232cd7e82c2947fe0d62f to your computer and use it in GitHub Desktop.
example of a makefile that runs an r job and sends an email when done.
This file contains 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
[email protected] | |
[email protected] | |
mode=standard # e.g., quick, standard, publication | |
all: | |
make models mode=$(mode) | |
make ppc mode=$(mode) | |
make standard-figures mode=$(mode) | |
make yhat mode=$(mode) | |
models: | |
Rscript -e "library(knitr); analysis_mode = '$(mode)'; knit('reports/bayesian-models.rmd')" | |
echo "Models on $(mode) is complete." | mail -s "Models on $(mode) is complete." $(EMAIL) | |
ppc: | |
Rscript -e "library(knitr); analysis_mode = '$(mode)'; knit('reports/bayesian-ppc.rmd')" | |
echo "ppc on $(mode) is complete." | mail -s "ppc on $(mode) is complete." $(EMAIL) | |
figures: | |
Rscript -e "library(knitr); analysis_mode = '$(mode)'; knit('reports/bayesian-figures.rmd')" | |
echo "standard-figures on $(mode) is complete." | mail -s "standard-figures on $(mode) is complete." $(EMAIL) | |
yhat: | |
Rscript -e "library(knitr); analysis_mode = '$(mode)'; knit('reports/mu_y.rmd')" | |
echo "yhat on $(mode) is complete." | mail -s "yhat on $(mode) is complete." $(EMAIL) | |
updatelocal: | |
rsync -av --update $(SERVER):~/dynamic-pwi-analysis/ . | |
updateserver: | |
rsync -av --update . $(SERVER):~/dynamic-pwi-analysis/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment