You misread the example code. It actually says:
seqselect(x, start=c(6,1), end=c(10,5))
# ---------------------^ 1, not 2!
… and of course that does exactly what the function says: it concatenates several subranges – in that case, the subranges [6, 10] and [1, 5].
In other words, seqselect
takes a number of N start and end points and for each of the i ∈ 1…N paired start and end points, it extracts the range [starti, endi].
The seqselect
arguments are admittedly a bit weird (I would even say the function is badly designed). It would be much more logical to specify this request as
seqselect(x, (6, 10), (1, 5))
… i.e. giving each range explicitly.