The Colon (:) Operator generate regular sequences.
from:to # sequence
a:b # cross of factor
where:
> 1:4
[1] 1 2 3 4
> 6:pi
[1] 6 5 4
> pi:6
[1] 3.141593 4.141593 5.141593
> f1 <- gl(2, 3); f1
[1] 1 1 1 2 2 2
Levels: 1 2
> f2 <- gl(3, 2); f2
[1] 1 1 2 2 3 3
Levels: 1 2 3
> f1:f2 # a factor, the "cross" f1 x f2
[1] 1:1 1:1 1:2 2:2 2:3 2:3
Levels: 1:1 1:2 1:3 2:1 2:2 2:3
?":"
help(":")