Learn R Programming

eList (version 0.0.1.0)

iter: Create an Iterable Object

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

iter(x)

Arguments

x

object to be looped across

Value

a vector

Examples

Run this code
# NOT RUN {
e <- new.env()
e$x <- 10
e$y <- letters[1:10]
iter(e)

# }

Run the code above in your browser using DataLab