[R-sig-hpc] how to get job index into R?

Dirk Eddelbuettel edd at debian.org
Tue Nov 3 15:19:00 CET 2009

On 3 November 2009 at 13:33, Unger, Kristian wrote:
| Many thanks Dirk!
| I actually did exactly this in my R script. The problem was that I did not know how to get the job index into R. Richard Pearson who replied earlier gave me the R command for doing this which is "Sys.getenv". Using this command I easily grab the job index number by using Sys.getenv("PBS_ARRAY_INDEX").

Cool. In that case I misunderstood the question -- you were really after the
interaction with your job scheduler.  My bad but kudos and thanks to Richard.


Three out of two people have difficulties with fractions.

More information about the R-sig-hpc mailing list