| .getRNG {rngtools} | R Documentation |
Getting RNG Seeds
Description
.getRNG is an S4 generic that extract RNG settings from a variety of
object types.
Its methods define the workhorse functions that are called by getRNG.
Usage
.getRNG(object, ...)
## S4 method for signature 'ANY'
.getRNG(object, ...)
## S4 method for signature 'missing'
.getRNG(object)
## S4 method for signature 'list'
.getRNG(object)
## S4 method for signature 'numeric'
.getRNG(object, ...)
Arguments
object |
an R object from which RNG settings can be extracted, e.g. an
integer vector containing a suitable value for |
... |
extra arguments to allow extension and passed to a suitable S4 method
|
Methods (by class)
"ANY": Default method that tries to extract RNG information from object, by
looking sequentially to a slot named 'rng', a slot named 'rng.seed'
or an attribute names 'rng'.
It returns NULL if no RNG data was found.
"missing": Returns the current RNG settings.
"list": Method for S3 objects, that aims at reproducing the behaviour of the function
getRNG of the package getRNG.
It sequentially looks for RNG data in elements 'rng', noise$rng
if element 'noise' exists and is a list, or in attribute 'rng'.
"numeric": Method for numeric vectors, which returns the object itself, coerced into an integer
vector if necessary, as it is assumed to already represent a value for
.Random.seed.