| 82 | == R Package Dependency == |
| 83 | |
| 84 | In order to run any of the SLURM scripts below, we would submit the SLURM script via '''sbatch''' command, but in general we would not expect the code to run successfully the very first time with out additional setup. We can try running the script without any additional setup, but we can expect to get the error such as in the following R session. |
| 85 | |
| 86 | {{{#!r |
| 87 | > library(doParallel) |
| 88 | Error in library(doParallel) : there is no package called ‘doParallel’ |
| 89 | }}} |
| 90 | |
| 91 | Thus we should first ensure that the required R package, in this case the R package '''doParallel''', is available and installed in your environment. For a range of options for installing R packages - depending on the desired level of reproducibility, see the section [#InstallingRPackages Installing R Packages on Cypress]. |
| 92 | |
| 93 | '''For Workshop''' : |
| 94 | If you use a temporary workshop account, use [#RPackageAlternative1 Alternative 1] for installing R packages. |
| 95 | |
| 96 | Thus we need to install the R package '''doParallel'''. |
| 97 | |
| 98 | {{{#!r |
| 99 | install.packages("doParallel") |
| 100 | ... |
| 101 | > library(doParallel) |
| 102 | Loading required package: foreach |
| 103 | Loading required package: iterators |
| 104 | Loading required package: parallel |
| 105 | > |
| 106 | }}} |
| 107 | |
| 108 | Once we have resolved our package dependencies, we now expect the job to run without errors. |
| 109 | |
188 | | Edit the new file '''bootstrap.sh''' to contain the above SLURM script code. |
189 | | |
190 | | === R Package Dependency === |
191 | | |
192 | | So, for example, in order to run the above, we would submit the above SLURM script via '''sbatch''' command, but in general we would not expect this code to run the very first time with out additional setup. We can try running the above scripts thus far without any additional setup, but we can expect to get the error such as in the following R session. |
193 | | |
194 | | {{{#!r |
195 | | > library(doParallel) |
196 | | Error in library(doParallel) : there is no package called ‘doParallel’ |
197 | | }}} |
198 | | |
199 | | Thus we should first ensure that the required R package, in this case the R package '''doParallel''', is available and installed in your environment. For a range of options for installing R packages - depending on the desired level of reproducibility, see the section [#InstallingRPackages Installing R Packages on Cypress]. |
200 | | |
201 | | '''For Workshop''' : |
202 | | If you use a temporary workshop account, use [#RPackageAlternative1 Alternative 1] for installing R packages. |
203 | | |
204 | | Once we have resolved our package dependencies, we now expect the job to run without errors. |
| 216 | Edit the new file '''bootstrap.sh''' to contain the above SLURM script code and submit as shown below. |