seqToHumanReadable | R Documentation |
Gets a short human readable string representation of an vector of indices.
## Default S3 method:
seqToHumanReadable(idx, tau=2L, delimiter="-", collapse=", ", ...)
idx |
A |
tau |
A non-negative |
delimiter |
A |
collapse |
A |
... |
Not used. |
Henrik Bengtsson
Internally, seqToIntervals
() is used.
print(seqToHumanReadable(1:2)) # "1, 2"
print(seqToHumanReadable(1:2, tau=1)) # "1-2"
print(seqToHumanReadable(1:10)) # "1-10"
print(seqToHumanReadable(c(1:10, 15:18, 20))) # "1-10, 15-18, 20"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.