Cast string "array.id" to integer

`asInt`expects a numeric input value. `array.id` as output from `Sys.getenv` is a string.