Welcome to the Iterator Tools project
The 'itertools' package provides a variety of functions used to create iterators,
as defined by REvolution Computing's 'iterators' package.
It is strongly inspired by the Python itertools module, and includes a
number of functions of the same name.
The 'isplit' functions were inspired by functions in the 'snow' package,
and are particularly useful for parallel computing tasks.
There are also several utility functions included that were contributed
by Hadley Wickham that aid in writing iterators. These include 'is.iterator',
'end_iterator', 'iteration_has_ended', and 'new_iterator'.
Thanks, Hadley!
This package is intended to be used with the 'foreach' package,
which has excellent support for iterators.
Used together, they can simplify many programming tasks.
Functions included in itertools:
- isplitVector: splits, or slices, a vector into shorter segments
- isplitCols: splits a matrix column-wise
- isplitRows: splits a matrix row-wise
- isplitIndices: iterate over 'chunks' of indices from 1 to n
- chain: chain multiple iterators together into one iterator
- enumerate: create an enumeration from an iterator
- ichunk: create lists of values from an iterator to aid manual chunking
- ihasNext: add a hasNext method to an iterator
- ifilter: only return values for which a predicate function returns true
- ifilterfalse: only return values for which a predicate function returns false
- ilimit: limit, or truncate, an iterator
- ireadBin: create an iterator to read a binary connection
- irep: an iterator version of the rep function
- irepeat: a simple repeating value iterator
- izip: zip together multiple iterators
- product: zip together multiple iterators in cartesian product fashion
- recycle: recycle values from an iterator repeatedly
- irecord: record values issued by an iterator
- ireplay: return an iterator that replays values recorded in a file
- is.iterator: indicates if an object is an iterator
- end_iteration: throws an exception to signal end of iteration
- iteration_has_ended: tests an exception to see if iteration has ended
- new_iterator: creates a new iterator object
The project summary page you can find here.