I have access to a large powerful cluster. I am halfway through a worthy R programmer, but completely new to shell commands (and terminal commands in general, except for the basic things you need to do to use ubuntu).
I want to use this cluster to start a bunch of parallel processes in R, and then I want to combine them. In particular, I have a problem similar to:
my.function <-function(data,otherdata,N){
mod = lm(y~x, data=data)
a = predict(mod,newdata = otherdata,se.fit=TRUE)
b = rnorm(N,a$fit,a$se.fit)
b
}
r1 = my.function
r2 = my.function
r3 = my.function
r4 = my.function
...
r1000 = my.function
results = list(r1,r2,r3,r4, ... r1000)
The above example is just a stupid example, but basically I want to do something 1000 times in parallel, and then do something with all the results from 1000 processes.
How to send 1000 tasks simultaneously to a cluster, and then combine all the results, for example, in the last line of code?
/ , RTFM, . , , , .
!