isubset: Generate all subsets

Description Usage Arguments Value Examples

View source: R/iterators.R

Description

An iterator to generate all subset of a collection

Usage

1
isubset(n, ..., chunks, chunkSize)

Arguments

n

The size of the set

...

currently ignred

chunks

number of chunks to be supplied by the iterator

chunkSize

size of a chunk (an alternative to chunks)

Value

An iterator function for the purpose

Examples

1
2
3
4
5
6
get_subs <- isubset(5, chunks = 4)
get_subs$nextElem()
get_subs$nextElem()
get_subs$nextElem()
get_subs$nextElem()
get_subs$nextElem()

BillVenables/WWRCourse documentation built on Jan. 31, 2021, 4:22 p.m.