getState: Return one or all state vectors, either from original...

Description Usage Arguments Value Author(s) Examples

View source: R/initPortableStreams.R

Description

The environment variable currentStates is a list of states of random generators. In most use cases, users will not need to use this function because the details are handled by useStream. Users may need to explicitly access the stream states if they want to extract that information and then pass it along to other functions that do not use the built-in R random generator framework.

Usage

1
getState(stream, origin = FALSE)

Arguments

stream

Optional. Selects a particular stream's state. If no value is supplied, then the list including all of the stream states is supplied.

origin

If FALSE (default), return the current, updated state of one or all random stream. If TRUE, return the initial stream states.

Value

Integer index value of currently selected stream

Author(s)

Paul E. Johnson pauljohn@ku.edu

Examples

1
2
3
4
5
6
7
8
9
mySeeds <- seedCreator(500, 5, file = "mySeeds.rds", seed = 123123)
setSeeds(mySeeds, run = 17)
runif(2)
getCurrentStream()
getState(origin=TRUE)
getState(stream = 2)
getState()
useStream(2)
runif(2)

webb767/ppsmac documentation built on July 28, 2020, 12:59 a.m.