When submitting array jobs using sbatch, users can specify indices in several
ways. These could be specified as, for example, ranges, "1-9", lists,
"1,2,5", or intervals as "1-7:3", which translates into "1, 4, 7". This
function expands those cases.
Usage
expand_array_indexes(x)
Value
A character vector with the expanded indices.
Arguments
x
A character vector. Array indexes (see details).
Details
x is assumed to be in the form of [jobid](_[array expression]),
where the expression after the underscore is optional. The first
The function will return an expanded version of this, e.g. if x = "8123_[1,3-6]"
the resulting expression will be the vector "8123_1", "8123_3", "8123_4",
"8123_5", and "8123_6".
This function was developed mainly to be used internally.