title: Run R codes on a cluster
body: <p>I use R to run some C codes (R Wrapper) that are very intensive. In consequence, I would like to run my .R file on a cluster. I used to run executables from C codes on the cluster with a .pbs file that looks like that:</p>
  
  <pre><code>#!/bin/bash
      #PBS -l procs=1
      #PBS -l walltime=240:00:00
      #PBS -N Name
      #PBS -m ea
      #PBS -M name@something.com
      #PBS -l pmem=1000mb
      #PBS -t 1-3
      echo "Starting run at: `date`"
      path/to/myscript
      echo "Job finished with exit code $? at: `date`"
  </code></pre>
  
  <p>Can I make an executable with my .R file and run it just as I did with my compiled C code? How can I compile my .R file?</p>