seqToHumanReadable {R.utils} | R Documentation |
Gets a short human readable string representation of an vector of indices.
## Default S3 method: seqToHumanReadable(idx, delimiter="-", collapse=", ", ...)
idx |
A vector of integer indices. |
delimiter |
A character string delimiter. |
collapse |
A character string used to collapse subsequences. |
... |
Not used. |
Henrik Bengtsson (http://www.braju.com/R/)
print(seqToHumanReadable(1:10)) # "1-10" print(seqToHumanReadable(c(1:10, 15:18, 20))) # "1-10, 15-18, 20"