ilimit: Create a limited iterator

Description Usage Arguments Examples

View source: R/ilimit.R

Description

Create an iterator that wraps a specified iterable a limited number of times.

Usage

1
ilimit(iterable, n)

Arguments

iterable

Iterable to iterate over.

n

Maximum number of values to return.

Examples

1
2
# Limit icount to only return three values
as.list(ilimit(icount(), 3))


itertools documentation built on May 21, 2017, 3:52 a.m.
Search within the itertools package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.