ilength {itertools2} | R Documentation |
Counts the number of elements in an iterator. NOTE: The iterator is consumed in the process.
ilength(object)
object |
an iterable object |
the number of elements in the iterator
ilength(1:5) == length(1:5)
it <- iterators::iter(1:5)
ilength(it) == length(1:5)
it2 <- ichain(1:3, 4:5, 6)
ilength(it2)
it3 <- ichain(1:3, levels(iris$Species))
ilength(it3)