seqToHumanReadable
From R.utils v2.10.1
by Henrik Bengtsson
Gets a short human readable string representation of an vector of indices
Gets a short human readable string representation of an vector of indices.
- Keywords
- attribute
Usage
# S3 method for default
seqToHumanReadable(idx, tau=2L, delimiter="-", collapse=", ", ...)
Arguments
See Also
Internally, seqToIntervals
() is used.
Examples
# NOT RUN {
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"
# }
Community examples
Looks like there are no examples yet.