Last active
September 5, 2017 01:48
-
-
Save daskelly/4f33a960504c2957b2f04e0eb2a554b2 to your computer and use it in GitHub Desktop.
Render an R markdown document on a PBS/Torque cluster
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
#!/bin/bash | |
#PBS -N name | |
#PBS -l nodes=1:ppn=1,mem=10gb,walltime=6:00:00 | |
#PBS -m n | |
#PBS -j oe | |
#PBS -r n | |
module load R/3.3.2 gcc/4.9.2 | |
module load pandoc/1.13.1 | |
cd $PBS_O_WORKDIR | |
RMD_FILE="/path/to/file.Rmd" | |
Rscript -e "library(methods); rmarkdown::render('$RMD_FILE', knit_root_dir=getwd(), output_dir=getwd())" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment