Skip to content

Instantly share code, notes, and snippets.

@DarwinAwardWinner
Created September 10, 2015 18:26
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save DarwinAwardWinner/2eb3705fb6ddab08ee47 to your computer and use it in GitHub Desktop.
Save DarwinAwardWinner/2eb3705fb6ddab08ee47 to your computer and use it in GitHub Desktop.
#!/bin/sh
# -*- mode:R -*-
#PBS -l nodes=1:ppn=8,mem=30gb
'\' >/dev/null 2>&1 || true
# This is bash code to set up the environment
echo "Hello from bash!"
echo "Args are: $@"
# Bash setup code ends here
Rscript - "$@" <<"EOF";
invisible('#')
## R code starts after this line
message("Hello from R!")
args <- commandArgs(TRUE)
message("Args are: ", deparse(args))
EOF <- NULL
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment