irnorm: Random Number Iterators

Description Usage Arguments Value Examples

Description

These function returns an iterators that return random numbers of various distributions. Each one is a wrapper around a standard R function.

Usage

1
2
3
4
5
irnorm(..., count)
irunif(..., count)
irbinom(..., count)
irnbinom(..., count)
irpois(..., count)

Arguments

count

number of times that the iterator will fire. If not specified, it will fire values forever.

...

arguments to pass to the underlying rnorm function.

Value

An iterator that is a wrapper around the corresponding random number generator function.

Examples

1
2
3
4
5
6
  # create an iterator that returns three random numbers
  it <- irnorm(1, count=3)
  nextElem(it)
  nextElem(it)
  nextElem(it)
  try(nextElem(it))  # expect a StopIteration exception

iterators documentation built on May 19, 2017, 7:35 p.m.

Search within the iterators package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.