Skip to content

Submitting jobs to the cluster with R

Gabriel A. Devenyi edited this page Jun 9, 2023 · 2 revisions

Running large statistical models in R on your local machine can take a very long time. In order to speed up the process, you can break up your jobs and send them to the cluster.

First you will need to load the following modules:

$  module load anaconda R rstuio minc-toolkit-v2 RMINC

Now you can launch your rstudio session.

In order to parallelize your jobs and send them to the cluster, you will have to include the following in your model: `parallel=c("slurm",200)`. The number you choose corresponds to how many jobs you are chunking your model into. An exmaple model will look something like this:

```R
mincLmer(abs_jac ~ ns(age,1)*new_groups+(1|mouse_id),filtered.data, mask=votedmask, parallel=c("slurm",100))
Clone this wiki locally