Learn R Programming

rngtools (version 1.5.2)

getRNG1: Extracting RNG Settings from Computation Result Objects

Description

getRNG1 is an S4 generic that returns the initial RNG settings used for computing an object. For example, in the case of results from multiple model fits, it would return the RNG settings used to compute the first fit.

Usage

getRNG1(object, ...)

# S4 method for ANY getRNG1(object, ...)

Arguments

object

an R object.

...

extra arguments to allow extension.

Methods (by class)

  • ANY: Default method that is identical to getRNG(object, ...).

Details

getRNG1 is defined to provide separate access to the RNG settings as they were at the very beginning of a whole computation, which might differ from the RNG settings returned by getRNG, that allows to reproduce the result only.

Think of a sequence of separate computations, from which only one result is used for the result (e.g. the one that maximizes a likelihood): getRNG1 would return the RNG settings to reproduce the complete sequence of computations, while getRNG would return the RNG settings necessary to reproduce only the computation whose result has maximum likelihood.