There are two code variations I use to generate time indexes. If I need time cycles

##   id    score time
## 1  a 15.62265    1
## 2  b 21.73583    2
## 3  c 13.21569    3
## 4  a 13.96619    1
## 5  b 16.67478    2
## 6  c 18.14021    3
## 7  a 22.91621    1
## 8  b 15.42282    2
## 9  c 24.37991    3

then I use a sequence command.

time <- seq(from = 1, to = 3, each = 3)

If I need time ordered

##   id    score time
## 1  a 27.74218    1
## 2  a 24.30701    1
## 3  a 14.65456    1
## 4  b 19.10893    2
## 5  b 17.50710    2
## 6  b 11.83570    2
## 7  c 15.87392    3
## 8  c 13.35465    3
## 9  c 26.94100    3

then I use a replicate command.

time <- rep(c(1:3), each = 3)

Bo\(^2\)m =)