chain: Create a chaining iterator

Description Usage Arguments Examples

Description

Create an iterator that chains multiple iterables together.

Usage

1

Arguments

...

The iterables to iterate over.

Examples

1
2
# Iterate over two iterables
as.list(chain(1:2, letters[1:3]))

Example output

Loading required package: iterators
[[1]]
[1] 1

[[2]]
[1] 2

[[3]]
[1] "a"

[[4]]
[1] "b"

[[5]]
[1] "c"

itertools documentation built on May 2, 2019, 2:26 p.m.