ichain {itertools2} | R Documentation |
Iterator that chains multiple arguments together into a single iterator
Description
Generates an iterator that returns elements from the first argument until it is exhausted. Then generates an iterator from the next argument and returns elements from it. This process continues until all arguments are exhausted Chaining is useful for treating consecutive sequences as a single sequence.
Usage
ichain(...)
Arguments
... |
multiple arguments to iterate through in sequence |
Value
iterator that iterates through each argument in sequence
Examples
it <- ichain(1:3, 4:5, 6)
as.list(it)
it2 <- ichain(1:3, levels(iris$Species))
as.list(it2)
[Package itertools2 version 0.1.1 Index]