[R] Output to sequentially numbered files... also, ideas for running R on Xgrid
JWC
joe.w.cross at gmail.com
Tue Mar 2 23:26:19 CET 2010
Hello,
I have some code to run on an XGrid cluster. Currently the code is written
as a single, large job... this is no good for trying to run in parallel. To
break it up I have basically taken out the highest level for-loop and am
planning on batch-running many jobs, each one representing an instance of
the removed loop.
However, when it comes to output I am stuck. Previously the output was an
array of [x, y, i] dimensions. The removed for-loop ran through i, each
iteration filling a x-y slice of the output array. Now the function returns
a single xy matrix for a supplied, single value of i.
Is there a way to output to sequentially numbered csv files such that they
can be reconstituted into the [x, y, i] array?
I have tried:
write(x, file=get("n"))
Where n is the value of i the function is running for.
But I get the error:
'file' must be a character string or connection
Is there a way of writing out to a csv file numbered with the value of a
variable?
Also, is this a very complicated way of parallelising this function?
Many thanks,
Joe
--
View this message in context: http://n4.nabble.com/Output-to-sequentially-numbered-files-also-ideas-for-running-R-on-Xgrid-tp1575824p1575824.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list