irepeat {itertools} | R Documentation |
Create an iterator that returns a value a specified number of times.
irepeat(x, times)
x |
The value to return repeatedly. |
times |
The number of times to repeat the value. Default value is infinity. |
# Repeat a value 10 times
unlist(as.list(irepeat(42, 10)))