The R package itertools2 is a port of Python's excellent itertools module to R for efficient looping and is a replacement for the existing itertools R package.


You can install the stable version on CRAN:

install.packages('itertools2', dependencies=TRUE)

If you prefer to download the latest version, instead run the following after installing devtools:



The itertools2 R package is licensed under the MIT License. However, this package depends on the iterators R package, which is licensed under the Apache License, Version 2.0. Both packages are freely available for commercial and non-commerical usage. Please consult the licensing terms for more details.

Try the itertools2 package in your browser

Any scripts or data that you put into this service are public.

itertools2 documentation built on May 30, 2017, 7:17 a.m.