USCbiostats / slurmR

slurmR: A Lightweight Wrapper for Slurm
https://uscbiostats.github.io/slurmR/
Other
58 stars 12 forks source link

Matching STATE_CODES should be using regex not exact #27

Closed gvegayon closed 4 years ago

gvegayon commented 4 years ago

The following code should be fixed here:

https://github.com/USCbiostats/slurmR/blob/17f7ad2fbd4c81fd27c20676e1c78512e6d31d3b/R/utils.R#L259

For something like

State <- lapply(STATE_CODES, function(jsc) {
  m <- grepl(paste0(jsc, collapse = "|"), State)
  JobID[which(m)]
})