1% Generated by roxygen2: do not edit by hand
2% Please edit documentation in R/RNG.R
3\docType{methods}
4\name{.getRNG}
5\alias{.getRNG}
6\alias{.getRNG,ANY-method}
7\alias{.getRNG,missing-method}
8\alias{.getRNG,list-method}
9\alias{.getRNG,numeric-method}
10\title{Getting RNG Seeds}
11\usage{
12.getRNG(object, ...)
13
14\S4method{.getRNG}{ANY}(object, ...)
15
16\S4method{.getRNG}{missing}(object)
17
18\S4method{.getRNG}{list}(object)
19
20\S4method{.getRNG}{numeric}(object, ...)
21}
22\arguments{
23\item{object}{an R object from which RNG settings can be extracted, e.g. an
24integer vector containing a suitable value for \code{.Random.seed} or embedded
25RNG data, e.g., in S3/S4 slot \code{rng} or \code{rng$noise}.}
26
27\item{...}{extra arguments to allow extension and passed to a suitable S4 method
28\code{.getRNG} or \code{.setRNG}.}
29}
30\description{
31\code{.getRNG} is an S4 generic that extract RNG settings from a variety of
32object types.
33Its methods define the workhorse functions that are called by \code{getRNG}.
34}
35\section{Methods (by class)}{
36
37"ANY": Default method that tries to extract RNG information from \code{object}, by
38looking sequentially to a slot named \code{'rng'}, a slot named \code{'rng.seed'}
39or an attribute names \code{'rng'}.
40
41It returns \code{NULL} if no RNG data was found.
42
43
44"missing": Returns the current RNG settings.
45
46
47"list": Method for S3 objects, that aims at reproducing the behaviour of the function
48\code{getRNG} of the package \code{getRNG}.
49
50It sequentially looks for RNG data in elements \code{'rng'}, \code{noise$rng}
51if element \code{'noise'} exists and is a \code{list}, or in attribute \code{'rng'}.
52
53
54"numeric": Method for numeric vectors, which returns the object itself, coerced into an integer
55vector if necessary, as it is assumed to already represent a value for
56\code{\link{.Random.seed}}.
57}
58
59