recycle {itertools} | R Documentation |
Create an iterator that recycles a specified iterable.
recycle(iterable, times=NA_integer_)
iterable |
The iterable to recycle. |
times |
integer. Number of times to recycle the values in the iterator.
Default value of |
# Recycle over 'a', 'b', and 'c' three times
recycle(letters[1:3], 3)