rstream.sample-methods: Methods for Function rstream.sample in Package 'rstream'

Description Usage Arguments Methods Note Author(s) See Also Examples

Description

Get random sample from an "rstream" object in package rstream.

Usage

1
2
3
4
## S4 method for signature 'rstream,numeric'
rstream.sample(stream,n=1)
## S4 method for signature 'rstream,numeric'
r(stream,n=1)

Arguments

stream

an "rstream" object.

n

sample size.

Methods

Methods available for all "rstream" subclasses: rstream.mrg32k3a-class, rstream.runif-class.

Note

r is equivalent to rstream.sample.

Author(s)

Josef Leydold josef.leydold@wu.ac.at

See Also

rstream.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## create a new rstream object (of subclass rstream.mrg32k3a)
s <- new("rstream.mrg32k3a")

## get a random number
x <- rstream.sample(s)

## get a random sample of size 100
x <- rstream.sample(s,100)

## alternatively ...
x <- r(s,100)

rstream documentation built on May 19, 2017, 10:12 a.m.

Search within the rstream 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.