iter {eList} | R Documentation |
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.
iter(x)
x |
object to be looped across |
a vector
e <- new.env()
e$x <- 10
e$y <- letters[1:10]
iter(e)