iter: Create an Iterable Object

Description Usage Arguments Value Examples

View source: R/iter.R

Description

Vector comprehension iterates over an object, but the default behavior may not be desirable for custom classes. iter allows the user to specify how the object behaves within a comprehension, or other loop in the eList package. Unless a method is specified for an object, iter will attempt to convert it to a list except for atomic vectors.

Usage

1
iter(x)

Arguments

x

object to be looped across

Value

a vector

Examples

1
2
3
4
e <- new.env()
e$x <- 10
e$y <- letters[1:10]
iter(e)

eList documentation built on Jan. 23, 2021, 1:05 a.m.