
Format Integer Array Indices into Compact SLURM --array Notation
Source: R/utils.R
format_slurm_array_indices.RdCompresses a set of positive integer task indices into contiguous ranges
suitable for SLURM --array, with optional concurrency throttling (%limit).
Examples
format_slurm_array_indices(c(1, 2, 3, 5, 8, 9))
#> [1] "1-3,5,8-9"
format_slurm_array_indices(1:20, max_concurrent = 4)
#> [1] "1-20%4"