The programming language R(4.0.3) is available in SQUID.
How to use
Environmental setting
-
You need to set up the environment using "environment modules".
$ module load BaseCPU
$ module load BaseR
Also, specify a large work area as the installation destination for the library.
In the following example, we create a directory named R_lib under the work area and specify it as the installation directory for the library.
$ mkdir /sqfs/work/[group name]/[user name]/R_lib
$ export R_LIBS=/sqfs/work/[group name]/[user name]/R_lib
package install
-
Any package can be installed on the front-end node of SQUID.
Since connection to the outside world is prohibited from the computation node, please install the packages necessary for the calculation on the front-end node beforehand.
The steps to install the "data.table" package on the front-end node are shown below.
Launch the R prompt.
$ R
Install the data.table package.
> install.packages("data.table")
Displays the installed packages
$ library()
パッケージ (ライブラリ ‘/sqfs/work/【グループ名】/【ユーザ名】/R_libs’ 中):
data.table Extension ofdata.frame
Execute R script in SQUID
- .
Please run the script as a batch job when using R. The following is an example of a job script when using R. The R script file (file.R) is given as the input file.
1 2 3 4 5 6 |
#!/bin/bash #PBS -q SQUID #PBS -l elapstim_req=1:00:00 #PBS --group=[group name] cd $PBS_O_WORKDIR Rscript file.R |