Get and set "rstream" object from/to R global generator
Get和,设置“rstream”对象/ R全球发生器
译者:生物统计家园网 机器人LoveR
描述----------Description----------
The function rstream.RNG(stream) is used to set a given "rstream" object stream as current global R uniform random number generators.
函数rstream.RNG(stream)是用来设置给定的“rstream”的对象stream当前的全球研发均匀分布的随机数生成器。
Without an argument (or NULL) it returns an "rstream" object that contains the current global generator. It is a copy (clone) of the global generator and thus it can be handled independently from the global generator.
没有一个参数(或NULL)它返回一个的“rstream”的对象,包含当前全球发生器。它是一个副本(克隆)的全球发生器,因此可以独立地从全局发生器处理。
用法----------Usage----------
rstream.RNG(stream = NULL)
参数----------Arguments----------
参数:stream
NULL or an "rstream" object
NULL或“rstream的”对象
值----------Value----------
rstream.RNG returns an "rstream" object.
rstream.RNG返回“rstream”的对象。
(作者)----------Author(s)----------
Josef Leydold <a href="mailto:josef.leydold@wu.ac.at">josef.leydold@wu.ac.at</a>
参见----------See Also----------
rstream.
rstream。
实例----------Examples----------
## create a new rstream.runif object[#创建一个新的rstream.runif对象]
s <- new("rstream.mrg32k3a")
## use this stream as global R uniform RNG[#使用此流作为全球研发统一的RNG]
rstream.RNG(s)
## get a (idenpendent) copy of the stream[#(idenpendent)复制的流]
## that contains the global R uniform RNG[#包含全球研发统一的RNG]
gs <- rstream.RNG()
## change the state of the global generator[#改变状态的全球发生器]
gs <- rstream.RNG()
rstream.nextsubstream(gs)
rstream.RNG(gs)