update.portableSeeds: Add initializing streams for more runs to a portableSeeds...

Description Usage Arguments Value Author(s) Examples

View source: R/seedCreator.R

Description

After seedCreator has created a collection of seeds, sometimes it is necessary to conduct additional runs that require more initializing values. This function fulfills that need.

Usage

1
2
## S3 method for class 'portableSeeds'
update(object, more, file = NULL, ...)

Arguments

object

A portableSeeds object created by seedCreator

more

An integer indicating the number of additional runs for which seeds are to be created.

file

A quoted character string representing file name into which the portableSeeds object is to be placed.

...

Additional arguments, none of which are put to any use

Value

A portableSeeds object that includes the original set, with more seeds added to the end. The entirety of this returned set should equal the set that would have been generated by seedCreator if the same number of seeds had been requested.

Author(s)

Paul E. Johnson pauljohn@ku.edu

Examples

1
2
3
4
5
6
7
8
9
require(parallel)
projSeeds <- seedCreator(2000, 3, seed = 123456, file = "someSeeds.rds")
projSeeds2 <- update(projSeeds, more = 19, file = "somePlusSeeds.rds")
identical(projSeeds[[1]], projSeeds2[[1]])
identical(projSeeds[[2000]], projSeeds2[[2000]])
projSeeds2[[2001]]
projSeedsLast <- projSeeds[[2000]][[3]]
projSeedsNext <- parallel::nextRNGStream(projSeedsLast)
identical(projSeedsNext, projSeeds2[[2001]][[1]])

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