R: Traverse a Python iterator or generator

iterate {reticulate} | R Documentation

## Traverse a Python iterator or generator

### Description

Traverse a Python iterator or generator

### Usage

    iterate(x, f = base::identity, simplify = TRUE)

### Arguments

`x` | Python iterator or generator
`f` | Function to apply to each item. By default applies the `identity` function which just reflects back the value of the item.
`simplify` | Should the result be simplified to a vector if possible?

### Details

Simplification is only attempted all elements are length 1 vectors of type "character", "complex", "double", "integer", or "logical".

### Value

List or vector containing the results of calling `f` on each item in `x` (invisibly).

[Package reticulate version 0.7 Index]