... | ... | @@ -16,9 +16,9 @@ Your R-script file with the name test.R looks like this: |
|
|
colnames(d) <- c("y1", "y2")
|
|
|
attach(d)
|
|
|
|
|
|
reg <- glm(cbind(y2) ~ y1, family = binomial)
|
|
|
save(reg, file = "reg.Rdata")
|
|
|
}}}
|
|
|
reg <- glm(cbind(y2) ~ y1, family = binomial)
|
|
|
save(reg, file = "reg.Rdata")
|
|
|
|
|
|
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
|
... | ... | @@ -32,8 +32,8 @@ To submit this R-script with qsub you need to create a shell script with the nam |
|
|
#$ -m be
|
|
|
#$ -M your.mail.address@lumc.nl
|
|
|
|
|
|
R CMD BATCH test.R
|
|
|
}}}
|
|
|
R CMD BATCH test.R
|
|
|
|
|
|
Now you can qsub your R-script like this:
|
|
|
|
|
|
qsub R_test.sh
|
... | ... | @@ -47,33 +47,32 @@ The output of R can be found in the filename <script-name>.Rout and the test.R e |
|
|
ISBN 3-900051-07-0
|
|
|
Platform: x86_64-unknown-linux-gnu (64-bit)
|
|
|
|
|
|
R is free software and comes with ABSOLUTELY NO WARRANTY.
|
|
|
You are welcome to redistribute it under certain conditions.
|
|
|
Type 'license()' or 'licence()' for distribution details.
|
|
|
|
|
|
Natural language support but running in an English locale
|
|
|
|
|
|
R is a collaborative project with many contributors.
|
|
|
Type 'contributors()' for more information and
|
|
|
'citation()' on how to cite R or R packages in publications.
|
|
|
|
|
|
Type 'demo()' for some demos, 'help()' for on-line help, or
|
|
|
'help.start()' for an HTML browser interface to help.
|
|
|
Type 'q()' to quit R.
|
|
|
|
|
|
[saved workspace restored](Previously)
|
|
|
|
|
|
> M <- replicate(2, runif(10e5, 0, 1))
|
|
|
> d <- data.frame(M)
|
|
|
> colnames(d) <- c("y1", "y2")
|
|
|
> attach(d)
|
|
|
>
|
|
|
> reg <- glm(cbind(y2) ~ y1, family = binomial)
|
|
|
Warning message:
|
|
|
In eval(expr, envir, enclos) : non-integer #successes in a binomial glm!
|
|
|
> save(reg, file = "reg.Rdata")
|
|
|
>
|
|
|
> proc.time()
|
|
|
user system elapsed
|
|
|
32.430 1.240 49.674
|
|
|
}}} |
|
|
\ No newline at end of file |
|
|
R is free software and comes with ABSOLUTELY NO WARRANTY.
|
|
|
You are welcome to redistribute it under certain conditions.
|
|
|
Type 'license()' or 'licence()' for distribution details.
|
|
|
|
|
|
Natural language support but running in an English locale
|
|
|
|
|
|
R is a collaborative project with many contributors.
|
|
|
Type 'contributors()' for more information and
|
|
|
'citation()' on how to cite R or R packages in publications.
|
|
|
|
|
|
Type 'demo()' for some demos, 'help()' for on-line help, or
|
|
|
'help.start()' for an HTML browser interface to help.
|
|
|
Type 'q()' to quit R.
|
|
|
|
|
|
[saved workspace restored](Previously)
|
|
|
|
|
|
> M <- replicate(2, runif(10e5, 0, 1))
|
|
|
> d <- data.frame(M)
|
|
|
> colnames(d) <- c("y1", "y2")
|
|
|
> attach(d)
|
|
|
>
|
|
|
> reg <- glm(cbind(y2) ~ y1, family = binomial)
|
|
|
Warning message:
|
|
|
In eval(expr, envir, enclos) : non-integer #successes in a binomial glm!
|
|
|
> save(reg, file = "reg.Rdata")
|
|
|
>
|
|
|
> proc.time()
|
|
|
user system elapsed
|
|
|
32.430 1.240 49.674 |