The rep() function in R may be used to repeat a series of integers. In R, there are two techniques for creating a vector with repeated values; the first method repeats each element in the vector, while the second method repeats the elements by a given number of times. The vectors are created using the rep function in each of these approaches. For example, rep(1:5, times=5) gives a vector with the sequence 1 to 5 repeated 5 times.