Generate an incrementally increasing sequence like 112123123412345

Use sequence:

> sequence(1:5)
 [1] 1 1 2 1 2 3 1 2 3 4 1 2 3 4 5

Leave a Comment