I have a data frame with 1666 rows. I would like to add a column with a repeating sequence of 1:5 to use with cut() to do cross validation. It would look like this:
Y x1 x2 Id1
1 .15 3.6 1
0 1.1 2.2 2
0 .05 3.3 3
0 .45 2.8 4
1 .85 3.1 5
1 1.01 2.9 1
... ... ... ...
Something, like this?