This will load the MKL-multi-threaded version of R, set the number of threads to be used to 4 (the same number of CPUs requested from PBS), and run the program 'myprog.R', storing results in a date-stamped log file.