this is a simple nested loop:
for (i in 1:2){ for (j in i:i+1){ print(i) print(j) } }
the output is: 1 2 2 3
while I expect: 1 1 1 2 2 2 2 3