Use environment modules with qsub script

If you want to use the modules command within a script that you want to submit with qsub
you need to source /usr/local/Modules/current/init/bash.
An example script that would submit a R v3.2.3 job would look like this: