iter.array: Iterator over array

View source: R/multi.R

iter.arrayR Documentation

Iterator over array

Description

Iterator over array

Usage

## S3 method for class 'array'
iter(obj, by = 1, recycle = FALSE, ...)

Arguments

obj

An array.

by

The dimension to iterate over.

recycle

Should the iterator reset?

...

not used

Value

An iterator. This is an S3 arrayiter object, used in conjunction with nextElem to iterate over one index of an array.

Author(s)

David Gerard

See Also

nextElem.arrayiter()

Examples

glist <- multidog_to_g(
  mout = ufit,
  ploidy = 4,
  type = "all_gl",
  p1 = "indigocrisp",
  p2 = "sweetcrisp")
g <- iterators::iter(glist$g, by = 3)
head(iterators::nextElem(g))
head(iterators::nextElem(g))
head(iterators::nextElem(g))


segtest documentation built on July 1, 2025, 1:07 a.m.