collapse event indexes into ranges
createEventRanges(x)
x
a numerical vector
a string of isolated events and event ranges