Create an enumeration object

Share:

Description

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

Usage

1
enumerate(iterable)

Arguments

iterable

Iterable to iterate over.

Examples

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