enumerate {itertools}R Documentation

Create an enumeration object

Description

Create an iterator that iterates over an iterable, returning the value in a list that includes an index.

Usage

enumerate(iterable)

Arguments

iterable

Iterable to iterate over.

Examples

# Create an enumeration of five random numbers
as.list(enumerate(rnorm(5)))

[Package itertools version 0.1-3 Index]