irep: Iterator that replicates elements of an iterable object
Description
Constructs an iterator that replicates the values of an object.
Usage
irep(object, times = 1, length.out = NULL, each = NULL)
irep_len(object, length.out = NULL)
Arguments
object
object to return indefinitely.
times
the number of times to repeat each element in object
length.out
non-negative integer. The desired length of the iterator
each
non-negative integer. Each element is repeated each times
Value
iterator that returns object
Details
This function is intended an iterable version of the standard
rep function. However, as exception, the recycling
behavior of rep is intentionally not implemented.