File: irnorm.Rd

package info (click to toggle)
r-cran-iterators 1.0.7-1
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 532 kB
  • sloc: sh: 29; makefile: 1
file content (37 lines) | stat: -rw-r--r-- 935 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
\name{irnorm}
\alias{irnorm}
\alias{irunif}
\alias{irbinom}
\alias{irnbinom}
\alias{irpois}
\title{Random Number Iterators}
\description{
  These function returns an iterators that return random numbers
  of various distributions.
  Each one is a wrapper around a standard \code{R} function.
}
\usage{
irnorm(..., count)
irunif(..., count)
irbinom(..., count)
irnbinom(..., count)
irpois(..., count)
}
\arguments{
  \item{count}{number of times that the iterator will fire.
               If not specified, it will fire values forever.}
  \item{\dots}{arguments to pass to the underlying \code{rnorm} function.}
}
\value{
  An iterator that is a wrapper around the corresponding random number
  generator function.
}
\examples{
  # 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
}
\keyword{utilities}