First of all, have a look at the chapter
First steps on the clusters
Then, get the R scripts example from our
c4science repository
(Method to get those scripts explained at first step)