... | ... | @@ -10,7 +10,7 @@ Please use R on Shark together with qsub, this is easily done with the folowing |
|
|
The command to use in a shell script is : R CMD BATCH <script-naam.R>
|
|
|
Your R-script file with the name test.R looks like this:
|
|
|
|
|
|
#!sh
|
|
|
#!/bin/bash
|
|
|
M <- replicate(2, runif(10e5, 0, 1))
|
|
|
d <- data.frame(M)
|
|
|
colnames(d) <- c("y1", "y2")
|
... | ... | @@ -21,7 +21,7 @@ Your R-script file with the name test.R looks like this: |
|
|
|
|
|
To submit this R-script with qsub you need to create a shell script with the name R_test.sh that looks like this:
|
|
|
|
|
|
#!sh
|
|
|
|
|
|
#!/bin/bash
|
|
|
#$ -S /bin/bash
|
|
|
#$ -q all.q
|
... | ... | @@ -41,7 +41,7 @@ Now you can qsub your R-script like this: |
|
|
|
|
|
The output of R can be found in the filename <script-name>.Rout and the test.R example .Rout file looks like this:
|
|
|
|
|
|
#!sh
|
|
|
#!/bin/bash
|
|
|
R version 2.13.0 (2011-04-13)
|
|
|
Copyright (C) 2011 The R Foundation for Statistical Computing
|
|
|
ISBN 3-900051-07-0
|
... | ... | |